Skip to content
Marvin's Toolbox.

Search tools

Type to filter all tools

Base64 Encoder & Decoder

Decode Base64 to text or encode text to Base64. Paste into the top box, read the result below, and flip the direction with one click. Handles Unicode correctly, reads URL-safe Base64, and shows binary payloads as a hex dump you can download.

Everything runs locally in your browser. Your data never leaves your device.

0 characters
0 characters

URL-safe Base64, line breaks and missing padding are handled automatically.

Next steps

Send this tool's output straight into another tool.

Convert text into every case at once: title case in the APA, AP, Chicago, MLA, Bluebook, AMA and NYT styles, sentence case, upper, lower, camelCase, snake_case, kebab-case and more.

Count words, characters, sentences, paragraphs, lines and more as you type, with estimated reading and speaking time.

Remove duplicate lines from a list or text, keeping the first occurrence. Optionally ignore case and whitespace, or drop blank lines too.

Replace text in two modes: plain find and replace all, or regular expressions with flag controls and capture group references like $1.

Compare two texts and see every added, removed and changed line highlighted, side by side or inline, with the changed words marked within each line. Ignore case, whitespace or blank lines, read a summary of how much changed, and export the result as a unified diff.

Paste a UUID to see what it carries: version, variant, and for time-based versions the exact timestamp, clock sequence and node. Also shows the raw bytes, the 128-bit integer and the URN form.

Decode Base64 to text or encode text to Base64. Paste into the top box, read the result below, and flip the direction with one click. Handles Unicode correctly, reads URL-safe Base64, and shows binary payloads as a hex dump you can download.

Convert numbers between binary, octal, decimal, hexadecimal and any base up to 36. Type into any field and the others update as you go. Handles huge integers without losing precision and accepts 0x, 0b and 0o prefixes.

Convert between scientific notation and full numbers as you type. Reads 1.23e5, 1.23 × 10^5 and plain numbers, shows the value written out, in normalized scientific notation and in engineering notation, and can round to any number of significant digits.

About the Base64 Encoder & Decoder Tool

This tool converts between Base64 and readable text, in either direction. Paste into the top box, read the result in the bottom one, and flip the direction with the switch button between them.

Text is treated as UTF-8, so accents, emoji and any other Unicode survive the round trip. Decoding is forgiving: line breaks and spaces are ignored, missing padding is filled in, and the URL-safe alphabet with - and _ is understood without any setting. Base64 that holds binary data instead of text is fine too. Images, PDFs, audio and video show up as a preview, everything else as a hex dump.

What you can do

  • Decode a Base64 string to text.
  • Encode text to Base64.
  • Decode a Base64 image, PDF, audio or video and preview it on the page.
  • Inspect other decoded binary data as a hex dump.
  • Download decoded binary data as a file with a fitting extension.
  • Encode with the URL-safe alphabet for tokens and URLs.
  • Decode Base64 that has line breaks or missing padding.
  • Flip the direction and keep the result as the new input.

How to use the Base64 Encoder & Decoder

  1. 1Pick the direction. Decoding is the default, the switch button flips it.
  2. 2Paste or type into the top box.
  3. 3Read the result below and copy it, or download decoded binary data as a file.

When the Base64 is not text

Not all Base64 hides text. If the bytes decode as UTF-8 you get them as readable text. An image, a PDF, audio or video is recognized by its magic bytes and rendered as a preview right on the page. Anything else, for example a compressed payload or a certificate, is shown as a classic hex dump with offsets and an ASCII column. From there you can copy the dump, download the raw bytes as a file named after the detected type, or forward them to another tool. Compressed data pairs well with the Data Decompressor.

Real errors are still called out: input with characters outside the Base64 alphabet or with an impossible length gets a clear message instead of a guess.

Escape text into HTML entities or decode entities back to plain text. Choose named or numeric entities, escape only the unsafe characters or everything outside ASCII, and read the result live.

Paste anything that looks encoded and this tool works out what was used and undoes it, layer by layer. The whole BaseXX family from Base16 to Base85, binary, URL escapes, HTML entities, ROT13 and gzip, Brotli or Zstandard compression are detected in any combination, and every step of the chain is reported.

Turn any text into a clean URL slug. Transliterates accents and non-Latin scripts to ASCII, with options for the separator, letter case and a length limit. Handles many titles at once, one line per slug.

Escape or unescape a string for JSON, JavaScript, regex, shell, SQL, CSV, XML and more. Paste text, pick the target format and copy the result, in either direction.

Encode text for use in URLs or decode percent-escaped strings back to readable text. Choose component, full-URL or form encoding, unwrap double-encoded strings, and break a URL into its parts with every query parameter decoded.

Format code in JavaScript, TypeScript, JSON, JSON5, HTML, Vue, CSS, SCSS, LESS, Markdown, YAML, GraphQL, XML and SQL. Pick tabs or spaces, set the indent width, and format the input in place with one click.