Developer ToolsA little help for every day

Search by name or task, such as JSON or percentage.

Developer Tools

Base64 and URL Encoder and Decoder

Encode or decode UTF-8 text as Base64 or URL-safe Base64URL, and percent-encode or decode URLs and query values, with byte and character counts.

View all tools
ResultUpdates as you type
5L2g5aW977yMSGVsbG8gV29ybGQh
Input bytes21
Output characters28

How to use Base64 and URL Encoder and Decoder

Choose an operation, such as Base64 encode or URL component encode, and paste your text. The output and its byte and character counts update as you type.

  1. Choose the operationPick Base64 or Base64URL encode or decode, URL component encode, URL decode or full URL encode.
  2. Paste the inputEnter plain text to encode, or the Base64 or percent-encoded string you want to decode.
  3. Copy the outputCopy the result. Decoded data that is not text is shown as hex bytes with a warning.

Base64 vs Base64URL

Base64 turns bytes into 64 printable characters (A–Z, a–z, 0–9, + and /) and pads the end with =. Text is converted to UTF-8 first, so Hello, World! (13 bytes) becomes SGVsbG8sIFdvcmxkIQ== and accented or non-Latin characters survive the round trip. Base64URL, used in JWTs and many web tokens, swaps + for - and / for _ and drops the padding, giving SGVsbG8sIFdvcmxkIQ for the same text. When decoding, missing padding is added automatically and - or _ in the input are read as Base64URL. Base64 is an encoding, not encryption: anyone can decode it.

URL component encoding vs full URL encoding

URL component encode (encodeURIComponent) escapes everything that has a meaning in a URL, including / ? & = and spaces, so café & crème?x=1/2 becomes caf%C3%A9%20%26%20cr%C3%A8me%3Fx%3D1%2F2. Use it for a single query value or path segment. Full URL encode (encodeURI) keeps the URL structure and only escapes characters that are never allowed, such as spaces and non-ASCII letters, so https://example.com/a path/?q=café&x=1 becomes https://example.com/a%20path/?q=caf%C3%A9&x=1. URL decode reverses both and reads + as a space, as in form data.

Accuracy and data handling

Validate the result with your project's own tests and runtime rules before using it in production. The calculation runs in your current browser; the tool code does not send the input to a processing API.

Often Used Together

Next step

FAQ

Is Base64 encryption?

No. Base64 only re-encodes bytes as text so they can travel through email, JSON or URLs. It has no key and anyone can decode it, so never use it to hide passwords or secrets.

How do I decode the payload of a JWT?

Copy the middle part of the token, between the two dots, and choose Base64URL decode. The JSON claims appear as readable text. The signature is not checked, so this does not prove the token is genuine.

Why does my decoded output show hex bytes?

The decoded data is not valid UTF-8 text, for example an image or compressed data, so the bytes are listed in hex instead. Text that was encoded in another character set can trigger this too.

Why does URL decoding fail?

Every % must be followed by two hex digits that form valid UTF-8. Input such as 100% or a cut-off sequence like %E2%82 cannot be decoded, so the tool reports an incomplete %XX sequence.

More Developer Tools

Related tools