Skip to content
Toolars
Explore
Report bug

Developer · Local utility

Base64 Encoder / Decoder

Encode Unicode text to Base64 or decode it back with live validation, URL-safe and UTF-8 options, and a swap button for round trips.

Task path / input to outcome

Pick Encode or Decode

Runs locally · Nothing is uploaded

How Base64 Encoder/Decoder works, privacy, and related tools

Task path / input to outcome

How to encode and decode Base64

  1. 01

    Pick Encode or Decode

    Use the mode tabs to choose a direction. The result pane updates live as you type, and the status dot reports Ready, Valid, or Error for the current input, so malformed values surface before you copy anything.

  2. 02

    Enter the value

    Type into the Text input pane to encode, or paste into the Base64 input pane to decode. Load sample drops in a tiny example so you can see the round trip first, and whitespace inside a pasted Base64 value is ignored when decoding.

  3. 03

    Set the options

    UTF-8 is on by default and is required for characters beyond the Latin-1 byte range; URL-safe swaps + and / for - and _ and strips the padding; Preserve line breaks, also on by default, keeps newlines instead of folding them into spaces. The options apply to both directions.

  4. 04

    Check the live validation

    Decoding validates as you go: characters outside the alphabet, an impossible length, and — with UTF-8 on — bytes that are not valid UTF-8 each produce a named error. Fix the flagged value and the result recovers immediately.

  5. 05

    Copy, swap, or download

    Use Copy result for the clipboard, Swap to move the output into the input and flip direction for a round trip, or Download .txt to save toolars-base64.txt or toolars-decoded.txt.

Tool facts

Processing
In your browser
Input leaves this device
Never
Retention
Nothing is stored
Price
Free

Your input stays in the browser.

Base64 Encoder/Decoder uses its verified local execution path and does not create a hidden input or output history.

Local execution

Runs inside the current browser tab.

No hidden processing

Active tool data never becomes a Toolars document record.

No account required

Use the core workflow without creating a profile. Favorites sync to your account after you sign in.

Immediate reset

Clear the tab and the active working data is gone.

What Base64 Encoder/Decoder actually does

A CI secret needs to travel as one line of environment variable; a data URL in a stylesheet wants its payload checked; an API response embeds a Base64 field that nobody can read by eye. Base64 Encoder/Decoder does the conversion in the tab you are already in, with live validation, and the Swap button turns a decode into an immediate re-encode so you can confirm a value round-trips cleanly. Because nothing is uploaded, tokens and configuration snippets stay on the device.

Examples / see what Base64 changes—and what it does not.

Make the representation visible.

Plain textToolarsVG9vbGFycw==
UTF-8 textHello, 世界SGVsbG8sIOS4lueVjA==
Decode a valueSGVsbG8=Hello
Base64 changes representation.

It does not encrypt the original content.

Encoding is not encryption

A readable representation does not hide or secure the source.

Standards matter

Choose standard or URL-safe output for the target system.

Text has an encoding

UTF-8 turns characters into predictable bytes first.

Invalid input should fail

Clear errors are safer than silently changing malformed data.

Common questions

Why do I get "Enable UTF-8 to encode characters outside the byte range"?
With UTF-8 off, encoding maps each character to a single byte, so only characters with codes up to 255 can be encoded. Emoji, CJK text, and most accented scripts need the UTF-8 option, which is enabled by default; turning it back on fixes the error.
What are the default option values?
UTF-8 is enabled, URL-safe is disabled, and Preserve line breaks is enabled. That combination handles ordinary multiline text and non-Latin characters out of the box; toggle URL-safe only when the value must survive inside a URL or file name.
What is URL-safe Base64?
A variant where + becomes - and / becomes _, with the trailing = padding removed, so the value survives inside URLs and file names. Enable the URL-safe option to produce it, and keep the same option on when decoding such a value — the decoder accepts unpadded input, so the round trip stays clean.
What does Preserve line breaks change?
When it is on, newlines are encoded and decoded as part of the text. When it is off, every line break is folded into a single space before encoding (and after decoding), which is what you want for values that must travel as one line, such as environment variables.
Why does my Base64 fail to decode?
ASCII whitespace and omitted padding are accepted. Incorrect padding and nonzero unused bits are rejected. UTF-8 preserves a leading BOM. Byte mode exports text, not raw binary.
Is the text I paste uploaded anywhere?
No. Encoding and decoding run fully inside the current browser tab, input is never sent or retained, and no account is required. Clearing the workspace discards both panes.

Keep reading

Continue in Developer

Related tasks, not a dead end.

Move into another focused workspace without returning to the full index.

Code to Image Converter

Export syntax-highlighted code as PNG or SVG for six languages with light and dark themes, line numbers, a window title, and 1x or 2x scale.

Create

URL Slug Generator

Turn titles into clean URL slugs with hyphens or underscores — accents stripped, ampersands expanded, non-Latin scripts preserved — live as you type.

Create

React Native Shadow Generator

Compare legacy shadow properties and boxShadow for React Native, tune iOS and Android output side by side, and copy the StyleSheet code.

Create

HTML Encoder/Decoder

Escape the five markup-breaking characters or decode named and numeric HTML entities back to text, locally, with one-click round trips.

Convert