Base64 encoder and decoder
Encode text to Base64 or decode it back, with full support for accents and emoji.
How it works
How Base64 encoding works
Base64 takes the bytes of your data three at a time (24 bits) and splits them into four groups of 6 bits. Each 6-bit group, a number from 0 to 63, is written as one character from the Base64 alphabet. If the data doesn't divide evenly by three, = signs pad the end.
Example: the text Hi is the bytes 72 and 105. In binary that is 01001000 01101001, regrouped into 010010 000110 1001(00), which reads as S, G and k, plus one padding sign: SGk=.
Text, bytes and UTF-8
Base64 encodes bytes, not letters. DevBenchr turns your text into bytes with UTF-8, the encoding used almost everywhere, so accents and emoji work. The browser's built-in btoa() doesn't do this and fails on anything outside basic Latin characters.
More tools
More on the bench
JSON formatter and validatorPretty-print, minify and validate JSON, with the exact line of any error. URL encoder and decoderPercent-encode and decode URLs and query values, and break a URL into parts. CSV to JSON converterConvert CSV to JSON and JSON to CSV, with delimiter detection. UUID generatorGenerate random v4 or time-ordered v7 UUIDs, one or a hundred at a time. JWT decoderRead the header and claims of a JSON Web Token, with expiry dates in plain English. Hash generatorSHA-1, SHA-256, SHA-384 and SHA-512 hashes of any text.
Frequently asked questions
What is Base64?
Base64 is a way to write any data using only 64 safe characters: A–Z, a–z, 0–9, + and /. It is used to put binary data or special characters where only plain text is allowed, such as in emails, JSON, data URLs and HTTP headers.
Is Base64 encryption?
No. Anyone can decode Base64 instantly; it hides nothing. Never use it to protect passwords or secrets. It only changes how data is written, not who can read it.
What is URL-safe Base64?
A variant that replaces + with - and / with _, and usually drops the = padding, so the result can be used in URLs and file names without escaping. JSON Web Tokens use it. The decoder here accepts both kinds.
Why does the Base64 get longer than my text?
Base64 uses 4 characters for every 3 bytes, so it is about 33% larger than the original. Accented letters and emoji take 2–4 bytes each in UTF-8, so they grow even more.