Skip to content
LocalToolLab

100% Client-Side • Zero Server Uploads

Base64 Converter

Encode and decode Unicode text or files to Base64 and Base64URL locally.

Encode and decode text and files to Base64 and Base64URL entirely in your browser. The converter handles Unicode correctly using TextEncoder and TextDecoder, supports URL-safe output, and can process a selected file without uploading it. Input is capped at 2 MB in either direction.

Base64 increases payload size by roughly a third, which matters for email attachments and JSON APIs with strict limits. Use standard Base64 for data URIs and Base64URL for URL segments and JWTs, where plus and slash characters would need escaping. Decoding is strict: remove whitespace and line breaks first, and expect an error rather than a guess when the input is malformed.

Interactive Base64 Converter workspace

File mode reads a text file (up to 2 MB) into the input box. Nothing is uploaded.

78 / 2,097,152 bytes used

Base64 output

SGVsbG8sIExvY2FsVG9vbExhYiEgRW5jcnlwdGlvbiBwcm90ZWN0cyBkYXRhOyBCYXNlNjQgb25seSByZS1lbmNvZGVzIGl0LiDwn5qA

Base64 is an encoding, not encryption. Anyone can decode it.

How to use the Base64 Converter

  1. 1

    Choose a mode

    Select Encode or Decode, and choose between standard Base64 and URL-safe Base64URL output.

  2. 2

    Enter your input

    Paste text to convert, or select a file in file mode. The input is checked against the 2 MB cap before processing.

  3. 3

    Review and copy

    View the result and copy it to your clipboard or download it as a file.

  4. 4

    Switch format when needed

    Use Base64URL for JWT segments and URL parameters, and standard Base64 for data URIs.

Why use this tool

Unicode-safe

Text is encoded using TextEncoder/TextDecoder so multi-byte characters are handled correctly.

No uploads

File mode reads the selected file locally. Nothing is uploaded to a server.

Size protection

Input is capped at 2 MB with a visible warning so the browser stays responsive.

Unicode safe

Text is converted through TextEncoder and TextDecoder so emoji and non-Latin scripts survive a round trip.

Common use cases

Encode data for URLs

Convert text or text-based files into a Base64URL string safe for use in URLs and query parameters.

Decode API responses

Decode Base64-encoded data returned by an API to inspect the original content.

Convert files locally

Encode a file to Base64 without uploading it, then copy or download the result.

Frequently asked questions

What is the difference between Base64 and Base64URL?
Base64URL replaces + with - and / with _, and omits padding, making it safe for use in URLs and filenames.
Can I convert a file?
Yes. File mode lets you select a local text file and encode its contents. The file is read in your browser and never uploaded.
Is there a size limit?
Yes. Input is capped at 2 MB for both encoding and decoding. Larger inputs are rejected with a visible warning.
Is my data sent to a server?
No. All encoding and decoding happens in your browser. No data is transmitted or stored.

Keep working in your browser with another tool from the same category.

Developer

JWT Decoder

Inspect JWT headers and payloads locally without verifying signatures or sending tokens anywhere.

Open tool
Developer

Regex Tester

Test JavaScript regular expressions with safe highlighting, capture groups, and replacement previews.

Open tool