Base64 encode / decode
Base64 encode / decode. Transform, inspect and copy your data. Your files stay on this device. Processing happens in your browser.
Enable JavaScript to use the tools. Files are processed in your browser.
How to use it
To encode text, type or paste it and press Encode.
To decode, paste a Base64 string and press Decode. If the result is text it is shown; if it is binary data, such as an image, a download link appears.
To encode a file, choose it under Encode a file; tick as data URL to get a string you can paste into HTML or CSS.
What is Base64?
Base64 represents binary data using 64 safe characters: A–Z, a–z, 0–9, plus and slash, with equals signs as padding. Every 3 bytes of input become 4 characters, so encoded data is about 33% larger. It is used wherever binary data must travel through a channel designed for text, such as email attachments (MIME), JSON payloads, data URLs and HTTP Basic authentication headers.
Base64 is not encryption
Anyone can decode Base64 instantly, so it provides no secrecy at all. Do not use it to hide passwords or personal data. If a system asks you to send a key or token in Base64, treat the encoded string exactly as carefully as the original secret.
Text encoding and URL-safe Base64
Text is converted to UTF-8 bytes before encoding, so accented letters, Chinese characters and emoji round-trip correctly. The URL-safe variant from RFC 4648 replaces plus and slash with minus and underscore and drops padding, which is what JSON Web Tokens and many web APIs use. The decoder accepts both variants, ignores spaces and line breaks, and strips a data: prefix if one is pasted.
Privacy and size
The input is processed in this browser, without sending it to a conversion server. Pasted UTF-8 text and imported files are limited to 10 MiB each; complex data may fail sooner because memory and parser limits also apply. Page and script loading, advertising or analytics requests are separate; see Privacy. Downloaded results remain on your device.
Related tools
Unix timestamp converter
JSON to CSV converter
CSV to JSON converter
URL encode and decode
All converters
Frequently asked questions
Is Base64 secure?
No. It is an encoding, not encryption, and anyone can reverse it.
Why is the decoded text garbled?
The original data may not be UTF-8 text. When the bytes are not valid UTF-8, the tool offers them as a file download instead.
What is the difference between Base64 and Base64URL?
Base64URL uses - and _ instead of + and / and usually omits = padding, so it can be used in URLs and file names.
Are my files uploaded?
This converter does not upload the selected file or input for processing. That does not mean the website makes no network requests; see Privacy for page, advertising and analytics traffic.
Related tools
- JSON to CSV
Turn structured data into a spreadsheet.
- CSV to JSON
Transform, inspect and copy your data.
- URL encode / decode
Transform, inspect and copy your data.
- Unix timestamp
Convert between timestamps and dates.
- Word counter
Count words, characters and lines as you type.
- Markdown to HTML
Preview Markdown and download a safe, standalone HTML document.
- HTML to Markdown
Convert headings, links and lists into portable Markdown.
- Colour picker & converter
Convert HEX, RGB and HSL colours and copy ready-to-use CSS.
- Text diff
Compare two texts by line or word and download a patch.
- UUID generator
Generate random UUID v4 identifiers in batches, locally.
- Password generator
Create passwords with cryptographic randomness and your character choices.
- YAML to JSON
Parse YAML, validate values and download formatted JSON.
- XML to JSON
Convert XML elements and attributes into structured JSON.