Skip to content
nestoo
  • What is my IPYour public IPv4 and IPv6 address, location and provider.Network & IP
  • Speed testMeasure your download and upload speed, latency and jitter.Network & IP
  • IP lookupLocation, provider and network of any IP address.Network & IP
  • DNS lookupA, AAAA, MX, TXT, NS and other DNS records for any domain.Network & IP
  • WHOIS lookupOwner, registrar and expiry date of any domain or IP.Network & IP
  • Prefix lookupCheck a prefix in BGP, RPKI and the IRRs before you announce it.Network & IP
  • ASN lookupOwner, announced prefixes and neighbours of any AS number.Network & IP
  • Subnet calculatorNetwork, broadcast, host range and mask of any IPv4 or IPv6 subnet.Network & IP
  • Port checkerCheck whether a port is open on your IP or a server.Network & IP
  • HTTP headers checkerResponse headers, status codes and redirect chain of a URL.Network & IP
  • SSL checkerCertificate validity, expiry and chain of any website.Network & IP
  • SPF, DKIM and DMARC checkerCheck a domain’s SPF, DKIM and DMARC records for mistakes.Network & IP
  • Password generatorStrong, random passwords generated right in your browser.Passwords & security
  • Password strength checkerHow long a password would take to crack, and if it leaked.Passwords & security
  • Hash generatorMD5, SHA-1, SHA-256, SHA-512 and CRC32 hashes of text or files.Passwords & security
  • JSON formatterFormat, validate and minify JSON, with exact error locations.Developer tools
  • Base64 encoder/decoderEncode text or files to Base64 and decode it back.Developer tools
  • URL encoder/decoderEncode and decode URLs and query strings, and parse any URL.Developer tools
  • JWT decoderRead the header and claims of a JSON Web Token.Developer tools
  • UUID generatorRandom UUID v4 and time-ordered v7 identifiers.Developer tools
  • Unix timestamp converterConvert Unix timestamps to dates and dates to epoch time.Developer tools
  • Binary converterTranslate text to binary and convert between number bases.Developer tools
  • Image compressorMake JPG, PNG, WebP and AVIF files smaller, many at once.Image tools
  • Image resizerResize images to exact pixels or by percentage, many at once.Image tools
  • Image converterConvert HEIC, PNG, WebP, AVIF and more to JPG, PNG, WebP or AVIF.Image tools
  • Crop imageCrop, rotate and flip images to any size or aspect ratio.Image tools
  • EXIF viewer and removerSee the hidden data in photos, including location, and remove it.Image tools
  • Favicon generatorTurn a logo into favicon.ico, Apple touch icon and app icons.Image tools
  • Image to Base64Turn images into Base64 data URIs, and data URIs back into images.Image tools
  • Word counterCount words, characters, sentences and reading time.Text tools
  • Case converterUPPERCASE, lowercase, Title Case, camelCase, snake_case and more.Text tools
  • Diff checkerCompare two texts and highlight the differences.Text tools
  • QR code generatorFree QR codes for links, text, Wi-Fi and contacts, as PNG or SVG.Everyday tools
  • Percentage calculatorPercent of a number, percentage change, increase and decrease.Everyday tools
  • Unit converterConvert length, weight, temperature, volume, data and more.Everyday tools

Base64 encoder and decoder

Encode text or files to Base64, or decode Base64 back to readable text or the original file. Everything happens in your browser.

Encoding options

Runs in your browser. What you enter never leaves your device.

How to use it

  1. 1.Choose Encode to turn text or a file into Base64, or Decode to turn Base64 back into text or a file.
  2. 2.Type or paste into the box. The result updates as you type. To encode a file, click “Choose a file” or drop it onto the box.
  3. 3.Turn on “URL-safe alphabet” for Base64 that goes into URLs, file names or tokens, or “Output as a data URL” to embed an image straight into HTML or CSS.
  4. 4.To decode, paste plain Base64 or a whole data: URL. If the result is a file rather than text, you’ll see its type and can download it.
  5. 5.Click Swap to feed the result back in and check that the round trip gives you what you started with.

What is Base64?

Base64 writes any data (text, images, PDFs) using only 64 characters that survive every system: A–Z, a–z, 0–9, + and /. It exists because email, JSON, XML, URLs and many older protocols only carry plain text safely, while files are made of raw bytes.

The encoding takes the input three bytes at a time and writes each group of 24 bits as four characters of 6 bits each. That’s why Base64 is about 33% larger than the original, and why it often ends with = or ==: when the input isn’t a multiple of three bytes, padding fills the last group.

Base64 is an encoding, not encryption. There’s no key and anyone can decode it instantly, so it never protects passwords or personal data.

Standard and URL-safe Base64

Standard Base64 (RFC 4648) uses + and /, which have special meanings in URLs and file paths. URL-safe Base64, also called base64url, replaces them with - and _ and usually leaves out the = padding. JSON Web Tokens and many web APIs use it.

This decoder accepts both alphabets, with or without padding, and ignores spaces and line breaks. You can paste Base64 from an email, a PEM certificate or a log file without cleaning it up first.

Text, UTF-8 and data URLs

Base64 encodes bytes, not letters, so text has to become bytes first. This tool uses UTF-8, the character encoding of almost every website and API, which means accented letters, other alphabets and emoji all encode correctly and decode back exactly.

A data URL packs a whole file into a link: data:image/png;base64, followed by the Base64 data. Browsers display it like any other image, which is handy for small icons in HTML, CSS or email templates. For larger files, a normal file is better: the data URL is a third bigger and can’t be cached on its own.

Questions and answers

Is Base64 a form of encryption?

No. Base64 only changes how data is written down; there’s no key, and anyone can decode it in a second. To protect sensitive data, use real encryption, such as AES, or keep secrets in a password manager.

Why do Base64 strings end with = or ==?

Base64 turns every 3 bytes into 4 characters. When the length of the data isn’t a multiple of three, the last group is filled up with one or two = signs. URL-safe Base64 often omits them, because a decoder can work out the length without them.

How much bigger does Base64 make a file?

About a third: every 3 bytes become 4 characters, so a 300 kB image turns into roughly 400 kB of Base64. MIME line breaks add one more character for every 76.

How do I convert an image to Base64?

Choose Encode, click “Choose a file” and pick the image. Turn on “Output as a data URL” to get a string you can paste into an <img src="…"> attribute or a CSS url(). The image is read in your browser and never uploaded.

Why does my decoded text look garbled?

Either the data isn’t text at all (it may be an image, a PDF or a zip file) or the text was saved in a character set other than UTF-8, such as Windows-1252. When the bytes aren’t readable text, this tool shows them in hex, detects the file type where it can and lets you download the file.