Base64 Encoder / Decoder
Encode or decode text, files and images as base64, plus URL encode and decode. Runs in your browser.
Runs entirely in your browser; text and files are never sent anywhere.
What is Base64?
Base64 writes bytes using only letters, digits, + and /, so images or binary data can travel through places that only carry text (JSON, email, HTML, environment variables) without being mangled. It is not encryption: anyone can decode it. Data grows by about a third.
Where you meet it on servers and APIs
The HTTP Basic Auth header (Authorization: Basic ...), Kubernetes secret values, the header and payload of a JWT (base64url), email attachments, data: images inlined in CSS and HTML, and file fields in many APIs are all base64. On Linux and macOS the command line does the same:
echo -n 'Hello world' | base64
SGVsbG8gd29ybGQ=
echo 'SGVsbG8gd29ybGQ=' | base64 -d
Without -n, echo adds a trailing newline and the result changes; if this tool and the command disagree, that is usually why.
URL encoding (percent encoding)
Characters that are special in a URL, or outside ASCII, are written as % plus two hex digits: a space becomes %20, é becomes %C3%A9. Component encodes everything including &, =, / and ?; use it for a single query parameter value. Full URL leaves the characters that give a URL its structure alone and only encodes spaces and non-ASCII characters. HTML form data writes spaces as +; tick the matching box when decoding.
Non-ASCII letters in a domain name use punycode, not URL encoding; try our punycode converter, and the JSON formatter to make API responses readable.
More free tools
FAQ
About Base64 Encoder / Decoder
No. Base64 is only a way of writing bytes; it has no key and anyone can decode it in seconds. Never treat passwords, API keys or personal data as hidden because they are base64.
base64url uses - and _ instead of + and /, which cause trouble in URLs and file names, and usually drops the trailing = padding. JWTs and many web APIs use it. When decoding, the tool accepts both forms.
No. Encoding and decoding happen entirely in your browser; text and files are not sent anywhere, not stored and never put in the address bar.