Base64 Encode / Decode
Convert UTF-8 text or a local file to Base64 and back, with URL-safe output, a data URI option, an image preview and a file download.
Runs entirely in your browser — nothing you paste is uploaded.
Base64 reference
quick reference- A-Z a-z 0-9 + /
- The 64 characters of the standard alphabet; output length is padded with = to a multiple of four.
- - _
- URL-safe Base64 swaps + and / so the value can sit in a path segment or query string without escaping.
- 33%
- Base64 grows data by about a third, which is why large payloads should be sent as binary instead.
- btoa / atob
- Browser helpers that only accept Latin-1 bytes, so encode text as UTF-8 first.
- data:image/png;base64,
- An inline data URL; fine for tiny icons, wasteful for photos and cacheable assets.
- encoding, not encryption
- Anyone can decode Base64. Protecting a value needs encryption or signing.
Frequently asked questions
answered below the toolWhy does non-Latin text decode to garbage?
btoa and atob only handle Latin-1. This tool encodes the text as UTF-8 first, so Korean, Japanese and emoji survive the round trip.
When do I need URL-safe Base64?
In a query string or path segment, where + and / would be re-encoded; URL-safe replaces them with - and _.
Is Base64 encryption?
No. Anyone can decode it. Use it for transport encoding, never to protect a password or a key.
Related Python syntax guides
All Python guidesasyncpg DuplicatePreparedStatement on PgBouncer and Supabase
asyncpg caches prepared statements per connection while a transaction pooler rotates connections underneath it. The cache setting, pool sizing and retry that fix it.
PythonPython Tabulate: Markdown Grid Headers and Alignment
Use Python's tabulate library to format Markdown tables, set custom headers, and control column alignment with pipe and grid formats.
PythonUsing pytest.mark.parametrize for Parameterized Tests in Python
Learn how to use pytest.mark.parametrize to write parameterized tests in Python. Covers syntax, multiple arguments, fixtures, custom IDs, class/module-level use, and common pitfalls.
PythonDjango select_related and prefetch_related: Fix N+1 Queries
Learn how to eliminate N+1 queries in Django with select_related and prefetch_related, including practical examples, when to use each, and common pitfalls.