That callback URL with your API token should never leave the browser
Why a decoded URL can leak more than you think
Last month a friend who runs on-prem AI deployments pasted a callback URL containing an access token into a public online decoder. Minutes later the full address showed up on that site's "recent conversions" feed. The gateway was internal, but the ?token=sk-xxxx in the path was stored in plaintext anyway. We made one rule after that: any URL with query parameters gets encoded or decoded locally, never uploaded.
The irony is hard to miss. In 2026 the entire AI industry is selling "data stays on the device." Lenovo's YOGA Pro 15 RTX Spark, launched November 2, and Asus's ProArt Creator 16 RTX Spark, pushed for the Double Eleven sale, both run the NVIDIA RTX Spark N1X: a 20-core Grace CPU paired with 6,144 Blackwell GPU cores, 1 petaflop of FP4 compute, and up to 128GB of unified memory. Asus states it runs 120-billion-parameter models without splitting the job. iFlytek's Spark X2.6-4B, released October 22, is lighter at 4 billion parameters with a 1-million-token context, 200-plus languages, and an Apache 2.0 license; its on-device agent completion rate hit 41.9% versus roughly 12.8% for same-size models, and downloads have passed 4 million. Even office platforms like YuanKong AI Work lead with "works offline, data never leaves the device, zero token cost."
The model genuinely stays local. But when you debug an agent or wire up an API, you still handle URLs stuffed with query parameters. Uber turned thousands of internal APIs into callable tools through an MCP gateway—that pattern is everywhere now—and your local model's outbound calls carry callback addresses, auth tokens, and session IDs in the ?a=b&c=d string. Paste that into an online encoder and the tokens leave the browser. The privacy wall around your local model gets punched through by a single text box.
What URL encoding actually changes
The job is small: replace characters that can't appear raw in a URL with percent-encoding. A space becomes %20, Chinese text and slashes become sequences like %E4%BD%A0, and the reverse turns them back. The browser does this before a request anyway, but when you construct or inspect an endpoint by hand you have to do it yourself.
Take api.example.com/v1/chat?model=local-12b&token=sk-xxxx&session=abc123: after encoding, the spaces and Chinese turn into %20 and %E4%BD%A0 sequences while every parameter survives; decoding flips %20 back to a space. The URL encode/decode tool on Antpact runs entirely in your browser and never sends your input to a server. It offers two modes: application/x-www-form-urlencoded, which encodes spaces as plus signs and leaves some symbols intact, and encodeURIComponent, which escapes nearly everything non-alphanumeric—handy when the string is going inside JSON or a script. You can paste a whole line; there's no need to split parameters one by one.
Three mistakes that break requests
Mistake one: encoding only part of the string. The Chinese in the path stays raw while the parameters get encoded, and the server throws a 400. Running the entire string through the tool once is the safe path.
Mistake two: double-encoding. Feed an already-encoded string back through and you get %2520, which the decoder can't read. Check whether the string is already encoded before you run it again.
Mistake three: decoding a key-bearing URL in an online tool just to "see what it looks like." The peek is free, but the backend now holds everything you pasted. Verify it locally instead.
The on-device AI story of 2026 makes "keep data where it's produced" sound obvious, yet it often fails at the last step—don't toss a URL carrying a secret into some random web page. Encoding it in your own browser takes seconds, and the token never leaves.