Codificador Base64
Encode text to Base64 or decode Base64 back to text
Plain Text
Base64 Output
Sobre esta ferramenta
Base64 solves one specific problem: moving binary data through channels that only accept text. Email, JSON, XML, URLs and HTTP headers were all designed for readable characters, and raw bytes passing through them get corrupted - a byte that happens to look like a line ending or a control character breaks the format. Base64 encodes every three bytes as four characters drawn from a 64-symbol alphabet of letters, digits, plus and slash, all of which survive any text channel intact. That four-for-three ratio is why encoded data is about 33% larger than the original, and why Base64 is a transport format rather than a storage one. The single most important thing to understand is that it is not encryption. There is no key and no secret - anyone can decode it instantly, which is exactly what this tool does. Treating Base64 as a way to hide anything is a genuine security mistake, not a subtle one. Encoding and decoding here run entirely in your browser.
Como usar esta ferramenta
- Choose encode or decodeEncode turns readable text into Base64; decode turns Base64 back into the original text.
- Paste your inputType or paste the text. The result updates as you go, so there is no submit step.
- Check the outputEncoded output uses only letters, digits, + and / with = padding at the end. If decoding fails, the input is not valid Base64.
- Copy the resultCopy it straight into your code, config file or request body.
Por que usar
- Works both ways - encode and decode in the same place, without switching tools.
- Runs in your browser, so tokens, credentials and payloads are never transmitted.
- Handles Unicode correctly, which naive implementations frequently get wrong.
- Instant results with no size limit imposed by a server.
- No account and no rate limit.
Usos comuns
- Decoding a Base64 field from an API response or log to see what it actually contains.
- Encoding credentials for an HTTP Basic Authorization header.
- Embedding a small image or font directly in CSS or HTML as a data URI.
- Putting binary data safely inside a JSON payload or XML document.
- Inspecting the payload of a JWT, whose segments are Base64url-encoded.
Dicas para melhores resultados
- Base64url is a variant using - and _ instead of + and /, for safe use in URLs. JWTs use it, which is why a plain Base64 decoder sometimes fails on them.
- The = signs at the end are padding, not data. Some systems strip them, and a decoder may need them restored.
- If you are encoding an image file rather than text, the Image to Base64 tool handles the file reading for you.
- Encoded data is roughly a third larger, so it is a poor choice for anything big - embedding a large image as a data URI bloats the page.
- When decoding produces gibberish, the input was probably compressed or encrypted before encoding, not plain text.
Erros a evitar
- Using Base64 to hide sensitive data. It provides zero security - decoding takes one second and no key.
- Confusing it with encryption or hashing. Encoding is reversible by design; hashing is not, and encryption needs a key.
- Pasting a JWT into a plain Base64 decoder and getting an error, because JWTs use the Base64url alphabet.
- Encoding large files into data URIs, which makes pages far heavier than simply linking the file.
- Forgetting that encoded strings often contain +, / and = which need escaping when placed in a URL.
Formatos compatíveis
- Text
- Files (encode)
Opções disponíveis
- Encode
- Decode
Perguntas frequentes
Pick encode or decode above and paste your input. The result appears immediately and can be copied straight out - everything happens in your browser.
Yes. No account, no size limit and no server involved.
No, and this matters. Base64 is an encoding with no key and no secret - anyone can reverse it instantly. It makes data safe to transport through text-only channels, not safe from being read.
Base64 represents every three bytes as four characters, so output is about 33% larger. That overhead is the cost of using only characters guaranteed to survive a text channel.
Padding. Base64 works in three-byte groups, so when the input length is not a multiple of three, one or two = characters pad the final group. Some systems strip them and expect the decoder to add them back.
JWTs use Base64url, a variant that replaces + with - and / with _ so the token is safe in a URL. Use the JWT Decoder, which handles that alphabet and splits the three segments for you.
No. Encoding and decoding happen in your browser, which is why it is safe to decode a token here - though pasting live production credentials into any tool is a habit worth avoiding.
Base64 works on any bytes, but this tool is built for text. For image files, the Image to Base64 tool reads the file and produces a ready-to-use data URI.
As pessoas também pesquisam
- base64 encode decode online
- base64 decoder free
- what is base64 encoding
- base64 to text converter
- base64url vs base64
- is base64 secure
- base64 encode string