Base64 Encode URL
Client-sideGuideNewEncode URLs and query strings to Base64 for opaque links and redirects — distinct from percent-encoding.
Base64 Encode URL turns a full link into Base64 for opaque state or redirects in your browser. It is not the same as percent-encoding query parameters, and the URL is not uploaded.
Processed in your browser — data stays on your device
Key takeaways
- Encodes the entire URL string
- Different from URL Encode / Decode
- Standard Base64 may need extra escaping in query strings
- Runs locally in your browser
Features
Full-URL examples
Samples include schemes, hosts, paths, and query strings.
Clear vs percent-encoding
Copy explains when to use Base64 versus URL Encode for parameters.
Decode to recover links
Paste Base64 state values back into readable URLs for debugging.
Offline workspace
No upload — useful when links contain private staging hosts.
How it works
Paste a complete URL
Include the scheme when you need a recoverable absolute link.
Encode to Base64
Produce an opaque string for state fields or redirect bags.
Decode to verify
Decode and open or compare the original URL when debugging.
Example walkthroughs
HTTPS link with query
Entire URL becomes Base64 for opaque redirect or state storage.
https://example.com/app?ref=launch&utm_source=tools
Path + fragment
Fragments and paths are preserved in the UTF-8 bytes before encoding.
https://tools.rsroshi.dev/tools/base64#workspace
Use cases
OAuth-style state bags
Some flows stash a return URL as Base64 inside a state parameter.
Debug opaque redirects
Decode Base64 URL blobs from logs without calling a server.
Code snippets
URL → Base64
jsEncodes the literal URL string — different from encodeURIComponent.
const url = "https://example.com/app?ref=launch"; const b64 = btoa( String.fromCharCode(...new TextEncoder().encode(url)), );
Common errors
Link breaks in a query parameter
Cause: Raw Base64 includes + / = which are special in query strings.
Fix: Percent-encode the Base64 (URL Encode) when placing it in a query, or use Base64URL in your app.
Confused with URL Encode output
Cause: Percent-encoding and Base64 solve different problems.
Fix: Use URL Encode for parameter escaping; use this page for opaque Base64 of the whole URL.
About Base64 Encode URL
Base64 Encode URL is for turning a full link or query string into an opaque Base64 blob — common in redirect state, tracking payloads, or systems that forbid raw URLs.
This is not percent-encoding. For query-safe escaping of individual parameters, use URL Encode / Decode instead; use this page when the entire URL must become Base64.
Encode and decode stay client-side so draft deep links remain private.
Frequently asked questions
Is this Base64URL?
No. Output is standard Base64 (+, /, =). Convert to Base64URL in your app if a spec requires it.
When should I use URL Encode instead?
When you need percent-encoding for query or form values. Use this page when the whole URL must be Base64.
Can I encode only the path?
Yes — paste whatever string you need. Absolute URLs are shown in examples because that is the common intent.
Related tools
Base64 Encode / Decode
Encode UTF-8 text to Base64 or decode Base64 back to text — instantly in your browser.
Base64 Encode Text
Encode plain text notes, messages, and Unicode strings to Base64 in your browser — private and instant.
Base64 Encode JSON
Encode JSON payloads to Base64 for APIs, JWTs, and transport — decode back to UTF-8 JSON in your browser.
Base64 Encode HTML
Encode HTML fragments and markup to Base64 for data URLs, emails, and embeds — decode back in your browser.
URL Encode / Decode
Percent-encode text for URLs or decode encoded query strings — private and instant.
Popular tools
JSON Formatter
Format, beautify, and minify JSON in your browser. Free, private, and instant — no upload to a server.
JSON Validator
Validate JSON instantly in your browser. See type, size, and node counts — or exact parse errors with line and column.
JSON Viewer
Explore JSON as an interactive tree with paths, types, and expandable nodes — all processed locally in your browser.
JWT Decode
Decode JWT header and payload in your browser — inspect claims without uploading tokens.
Newest tools
UUID Generator
Generate UUID v4 identifiers in bulk — uppercase and hyphenless options, fully client-side.
Hash Generator
Generate SHA-1 / SHA-256 / SHA-384 / SHA-512 digests of text with Web Crypto — fully client-side.
JSON Compare
Compare two JSON documents structurally. Find added, removed, changed, and type-changed paths — privately in your browser.
JSON Diff
Generate a unified diff of two JSON documents after pretty-printing. Ideal for reading line-level changes quickly.
Explore more
Base64 Encode / Decode
Open the full Base64 Encode / Decode workspace.
All developer tools
Browse formatters, converters, encoders, and more.
Encoding tools
Base64, URL encode/decode, and related utilities.
Base64 Encode Text
Related intent page in the Base64 Encode / Decode cluster.
Base64 Encode JSON
Related intent page in the Base64 Encode / Decode cluster.
Base64 Encode HTML
Related intent page in the Base64 Encode / Decode cluster.
Guides & articles
Base64 for developers: text, JSON, URLs, and what it is not
Learn when to Base64-encode text or JSON, how that differs from URL percent-encoding, and why Base64 is not encryption.
Base64 URL strings on the RS Roshi blog
Encoding tutorials and edge cases for base64 url strings.
Privacy model
Why encoding tools process data only in your browser.