Skip to content
PrimeForgeTools
Theme: system

Webversion v1.0.0

URL Toolkit

encodeURI and encodeURIComponent are both “URL encoding”, and they differ on exactly eleven characters — #$&+,/:;=?@ — which are precisely the ones that carry structure in a URL. Pick the wrong one and you get a perfectly valid URL that is a different URL from the one you meant. This page shows all four escape sets at once, then splits a URL into its parts and parses or builds query strings.

Mode

Percent-escapes everything outside the selected set. All four answers are shown below, because choosing between them is the entire problem.

Escape set

≡ encodeURIComponent. Leaves ! ' ( ) * unescaped, which RFC 3986 would escape.

0 characters
Output0 characters

Read this once

Percent-encoding is not encryption. A token in a URL is a token in every log between here and the server — access logs, proxy logs, CDN logs, browser history, the Referer header.

?access_token=, ?sig=, presigned links, password-reset links and https://user:pw@host/ are all readable by anything in the path. Encoding them changes their spelling, not their exposure.

Privacy

This page runs every mode in this browser tab. Nothing you paste is sent to the server, stored, or written to the URL — which would be a peculiar thing for this tool to do.

No local storage, no analytics, no history entry. The honest asymmetry: the browser is local, the curl path is not. The terminal path transforms in memory and never writes or logs a body, but it is still a network request.

From the command line

The same URL answers a POST with the value alone and exactly one newline. The body is used byte-exactly, so use printf '%s' rather than echo when a trailing newline would matter — and always printf '%s', never bare printf, when the text contains a %.

printf '%s' 'a&b=c' | curl -fsS --data-binary @- 'https://tools.primeforge.app/url?variant=component'
printf '%s' 'https://x.example/p?a=1&a=2' | curl -fsS --data-binary @- 'https://tools.primeforge.app/url?mode=parse&out=query' | curl -fsS --data-binary @- 'https://tools.primeforge.app/url?mode=query&key=a'

Base64URL is not here on purpose: it already exists as /base64?variant=url, and a second implementation of one alphabet is two contracts to keep in step.