Base64 & URL Encoder / Decoder

Convert text and files to Base64 and back, turn images into data URIs, and encode, decode or take apart URLs. Full UTF-8 support, so emoji and accents survive the round trip.

  • 100% free
  • No sign-up
  • Runs in your browser

Base64 is encoding, not encryption: anyone can decode it.

Text to encode

Direction

0 characters · 0 bytes

Base64 result

0 characters · 0 bytes

0 BInput size
0 BOutput size
–Size change
About the tool

How the Base64 & URL Encoder / Decoder works

The Base64 & URL Encoder / Decoder converts text to Base64 and back as you type. It handles UTF-8 properly, so emoji, accents and non-Latin scripts survive the round trip, and it can produce URL-safe Base64 (using - and _ with no = padding) for tokens and web addresses. When decoding, it ignores spaces, line breaks and missing padding, and tells you exactly which character is wrong if the input is not valid Base64.

The file tab turns any file into Base64 text or a complete data URI, shows the size before and after, and gives ready-made <img> and CSS background-image snippets for images. It also works the other way: paste Base64 or a data URI and it detects the file type from the data URI or the first bytes of the file (PNG, JPG, GIF, WebP, PDF, SVG, ZIP and more), previews images and lets you download the file with the right extension.

The URL tab encodes a single value with encodeURIComponent or a whole link with encodeURI, decodes %-codes (optionally treating + as a space), and breaks a pasted URL into its protocol, host, path, fragment and a table of decoded query parameters. Remember that Base64 is an encoding, not encryption: anyone can decode it. Everything runs in your browser, nothing is uploaded and no AI is involved.

Frequently asked questions

Is Base64 a kind of encryption?

No. Base64 is an encoding: it turns bytes into plain letters, digits and a few symbols so they can travel safely in text, emails, JSON or URLs. Anyone can decode it, so never use it to hide passwords or secrets.

Are my text and files uploaded?

No. Encoding, decoding, file type detection and URL parsing all happen in your browser on your own device. Nothing you paste or drop is sent to a server.

What is URL-safe Base64?

Standard Base64 uses + and /, which have special meanings in URLs, and = for padding. URL-safe Base64 uses - and _ instead and usually drops the padding. It is common in JWTs and web tokens. The decoder here accepts both forms automatically.

Should I use encodeURIComponent or encodeURI?

Use encodeURIComponent for one piece of a URL, such as a query value or search term: it also encodes characters like / ? & = and #. Use encodeURI for a whole URL you want to keep working: it leaves those characters alone and only encodes spaces, accents and other unsafe characters.

Why is the Base64 version of my file bigger?

Base64 uses 4 characters for every 3 bytes, so the result is about 33% larger than the original file. That is why data URIs are best for small images and icons rather than large photos.

Keep exploring
  • Free
    Developer

    Word to HTML Converter

    Turn Word documents (.docx) or text pasted from Word into clean HTML or Markdown for any website, CMS or email.

    • DOCX to HTML
    • Markdown
    • Paste from Word
  • Free
    Developer

    JSON Formatter & Validator

    Format, validate and minify JSON, find errors by line, fix common mistakes, browse a tree view or convert to CSV.

    • Beautify
    • Validate
    • JSON to CSV
  • Free
    Productivity

    Password Generator

    Create strong random passwords and passphrases, see their real strength, and check your own password privately.

    • Strong passwords
    • Passphrases
    • Strength check
For makers

Have an AI Tool?

Submit your AI tool and help others discover it.