Base64 Toolbox
Encode and decode text, files and images locally with Base64, Base64URL, MIME and Data URI support
Text input
Enter text, Unicode, binary text or hexadecimal bytes.
Private by default: input is processed locally and is not saved. Press Ctrl/⌘ + Enter to run.
Result
The processed result will appear here.
No result yet
Enter a value and run the operation
Examples
Encode UTF-8 text as standard Base64
Hello, World!
helloBase64("Hello, World!") = SGVsbG8sIFdvcmxkIQ==
Base64("hello") = aGVsbG8=The trailing equals signs are padding that completes the final four-character Base64 block.
Decode Base64 back to text
SGVsbG8=HelloDecoding reconstructs the original bytes, which are then interpreted here as UTF-8 text.
Compare standard Base64 with Base64URL
🚀Standard Base64: 8J+agA==
Base64URL: 8J-agAFor the same UTF-8 bytes, Base64URL replaces the standard plus character with a hyphen and this representation omits padding.
About this tool
Base64 is a binary-to-text encoding that maps each three-byte block to four printable characters. It is useful when bytes must pass through a text-only channel, but the encoded value is reversible and provides no confidentiality, integrity, or authentication. Base64 is encoding, not encryption or secure obfuscation, and its output is usually about one-third larger than the original bytes.
The text workspace encodes UTF-8, ASCII, Latin-1/binary, or hexadecimal input and decodes Base64 back into the selected representation. It supports standard Base64, the URL-safe Base64URL alphabet, optional padding, MIME line wrapping, Data URLs, and strict canonical validation. File and image workspaces handle binary data without first coercing it into text.
All processing happens in the browser, so the input is not uploaded or stored by the tool. Interoperability still depends on matching the producer's alphabet, padding rules, and character encoding: the same characters encoded as UTF-8 and Latin-1 are different byte sequences and therefore produce different Base64 values.
How to use
Choose encode or decode
Open the Text workspace and select Encode for plain text-to-Base64 conversion or Decode for Base64-to-text conversion.
Set the byte encoding and Base64 profile
Choose UTF-8, ASCII, Binary/Latin-1, or Hexadecimal. When encoding, select standard Base64, Base64URL, MIME wrapped, or Data URI output and configure padding if the target protocol permits it.
Process the value
Paste the input and click Encode text or Decode Base64. Strict decoding rejects malformed or non-canonical input; lenient mode is available when a source omits padding or contains tolerated whitespace.
Copy or download the result
Copy text output directly, or download decoded bytes when the result represents binary data rather than readable text.
Use cases
Embedding small resources in Data URLs
Encode a small image or text asset for a data: URL when an inline resource is more convenient than a separate request.
Moving binary bytes through text formats
Represent a compact binary value inside a text-only field such as a JSON string, XML element, or environment variable, then decode it at the receiving boundary.
Preparing URL-safe protocol values
Use Base64URL when a specification such as JOSE/JWT requires the hyphen-and-underscore alphabet and commonly omits padding.
Inspecting encoded application data
Decode a Base64 field from an API response, configuration file, email, or log to determine which bytes or text it contains.
Common mistakes
Mistake:Treating Base64 as encryption or secure obfuscation.
Fix:Anyone can decode Base64 without a key. Use authenticated encryption when data must remain confidential, and never put a secret in a public value merely because it looks encoded.
Mistake:Removing trailing = padding without checking the receiving protocol.
Fix:Padding may be omitted only when the protocol explicitly permits it or the decoder restores it. Keep canonical padding for standard Base64 when interoperability requirements are unknown.
Mistake:Encoding characters with one charset and decoding the bytes with another.
Fix:Agree on the byte encoding, normally UTF-8, at both ends. A Latin-1/UTF-8 mismatch produces different bytes or mojibake even when the visible source text looked identical.
Mistake:Assuming standard Base64 is safe in every URL or JSON-adjacent protocol.
Fix:A plain JSON string can carry + and /, but URLs and token profiles may give those characters special meaning. Use Base64URL only where the surrounding specification requires its - and _ alphabet.
Frequently asked questions
Related guides
URL Encoding Explained: A Practical Guide to Percent-Encoding
Why URLs can't contain spaces or special characters, how percent-encoding works, and how to avoid the classic pitfalls — double-encoding, + vs %20, and encodeURI vs encodeURIComponent.
Base64 Encoding Explained: What It Is and When to Use It
What Base64 actually does, why it exists, and when you should (and shouldn't) use it — covering the alphabet, padding, Base64URL, Data URIs, and common mistakes.
How to Decode a JWT and Read Its Claims
A step-by-step guide to decoding a JSON Web Token by hand — Base64url decoding the header and payload, understanding common claims, and why decoding is not the same as verifying.
References & standards
Related tools
CSV to Chart
Paste or upload CSV data and generate bar, line, pie, or doughnut charts. Export as PNG.
CSV to JSON Converter
Paste CSV data and convert it to pretty-printed JSON instantly — supports custom delimiters, header row toggling, and value trimming.
cURL to Code Converter
Convert cURL commands to code snippets in multiple languages. Parse cURL and generate JavaScript, Python, PHP, and more.
Diff Checker
Compare two text blocks and highlight differences side-by-side
GraphQL Formatter & Validator
Format, validate and beautify GraphQL queries with syntax highlighting
HTML Encoder/Decoder
Encode and decode HTML entities. Convert special characters to HTML entities and back. Perfect for displaying code safely in HTML.