Back to guides

Basic Auth Generator|Authorization headers for staging APIs without hand-encoding

Encode username:password into Authorization: Basic in the browser—RFC 7617 style output, curl snippet, and a clean path to HTTP Request replay without sending secrets to WoDeTool.

By WGinit · November 28, 2026 · 6 min read · 11 views

Why Basic Auth still shows up in 2026

Legacy gateways, internal Grafana ingresses, old staging clusters, and one-off ops APIs still ask for HTTP Basic while your team lives in Bearer tokens everywhere else.

You rarely need another JSON tutorial—you need a correct Authorization line and a curl -u one-liner without fighting shell quoting on Windows or macOS.

Basic Auth Generator joins username:password, Base64-encodes it in the browser, and prints the raw token, full header, and sample curl. Credentials stay in the tab; WoDeTool does not receive them server-side.

Base64 is not encryption. Anyone on the wire after TLS termination can recover the pair. Use this for staging, VPN-only hosts, or TLS-protected paths—not as a substitute for OAuth.

What each output block is for

Edit username and password fields (defaults admin / secret). All three outputs update immediately.

Encoded value: Base64 of user:pass per RFC 7617. The page uses encodeURIComponent plus btoa, which behaves better than naive btoa when passwords contain non-ASCII characters.

Header line: Authorization: Basic . Paste into HTTP Request headers or a ticket for SREs comparing against auth_basic nginx blocks.

curl sample: curl -u "user:pass" … for terminal replay—swap the example host for your staging URL.

Only the first colon separates user from password; additional colons in the password belong to the password segment.

How this fits next to JWT and HMAC

If the doc shows Authorization: Bearer eyJ…, use the JWT expiry guide instead of this page.

Webhook signature verification is HMAC with a signing secret, not Basic—see HMAC webhook signing.

Some stacks terminate Basic at the edge and expect Bearer on the inner hop. Keep both headers straight; do not merge them into one line.

When you suspect gateway mangling, decode the encoded blob in Base64 locally to confirm it equals expectedUser:expectedPassword—for debugging only, not for Slack threads.

End-to-end flow (figure)

Credentials through Basic Auth to Authorization and HTTP replay

Working order: copy staging creds from vault → generate header here → follow Staging API HTTP Request in the browser for method, URL, and headers → read status before touching app code.

I note the account name in tickets; passwords stay in private channels. Redact the password field in screenshots.

401 and encoding triage (figure)

When 401 persists: creds, UTF-8, environment mix-ups

Persistent 401 often means a rotated password you did not paste, a trailing space from a PDF copy, a missing space after Basic, or prod credentials aimed at a staging host.

Rare servers interpret usernames as ISO-8859-1; UTF-8 service accounts may fail—switch to ASCII logins per vendor doc or fix server config. This tool encodes via the UTF-8 path.

Nginx htpasswd files store password hashes, not Base64 wire credentials. Do not paste htpasswd lines into Authorization.

Security boundaries

Closing the tab drops in-memory values; WoDeTool does not store them. Screen sharing, recordings, and aggressive browser extensions can still leak inputs—close when finished.

Never commit admin:changeme to git; keep .env ignored. Shared shells remember curl -u—prefer pasted headers and clear history on shared machines.

Production credential leaks require rotation and log review, not only deleting chat messages.

If policy forbids typing production passwords in a browser, use vault-backed CLIs; this page targets VPN staging spot checks.

FAQ

QSame as Postman Basic auth?

ASame math—Base64 of user:pass. This page adds curl and a standalone token field for nginx tickets.

QWhy does my terminal base64 differ?

AUsually newline noise, wrong split on :, or missing UTF-8 handling—compare side by side.

QOAuth replacement?

ANo redirects or refresh tokens—static passwords only.

QServer upload?

ANo—all client-side.

Worked example (step by step)

1. Staging GET https://staging.example.com/internal/health requires Basic; user ci-bot, password in vault path staging/ci-bot.

2. Open Basic Auth Generator, fill creds, copy the header line.

3. In HTTP Request, GET the URL, paste Authorization.

4. 200 → note success in ticket. 401 → decode encoded value via Base64 and verify ci-bot:… with no stray spaces.

5. Confirm the hostname is staging, not production.

6. After password rotation, repeat steps 2–4; headers do not auto-update.

7. If the service also needs Bearer, add a second header per the JWT guide—do not remove Basic unless docs say so.

Edge cases worth a second look

Passwords containing double quotes break naive curl -u copy/paste—escape per shell rules or use the header line instead of the curl block.

Empty username with non-empty password is valid in some brokers (:password); the tool will encode it—confirm the server accepts that shape.

Load balancers that strip Authorization on OPTIONS but forward it on GET can look like intermittent auth failure; compare methods in HTTP Request.

Mutual TLS frontends sometimes still demand Basic behind the client cert—both layers must succeed.

When migrating from digest auth to basic, old bookmarks may still hit the wrong challenge—clear browser cached auth or use incognito for a clean test.

Pairing with the staging replay guide

The staging HTTP guide already covers JSON bodies and status triage; add Basic when health checks return 401 before you ever see JSON.

Keep a single internal README snippet: host, method, which header type, and vault path—future you should not reopen three tabs to remember the combo.

If Basic works in HTTP Request but fails in CI, diff the exact header bytes (case, spacing) against what the tool printed—some runners inject extra quotes.

Document whether staging shares credentials with integration tests; rotating without updating both causes false alarms in nightly jobs.

For services that return 403 after auth succeeds, pivot to authorization docs—Basic only proves identity, not scopes.

Canary deployments sometimes protect only the new route with Basic while the old route stays open—verify which hostname your ticket references before blaming application regressions.

When partners email you a screenshot of Postman working, ask for the raw Authorization bytes, not only the decoded username—spacing and charset mistakes hide in the encoding layer.

References

IETF RFC 7617 defines the HTTP Basic authentication scheme and the user:pass Base64 token format browsers and proxies expect on the wire.

MDN documents how the Authorization header is formed and how user agents attach credentials to same-origin and cross-origin requests under fetch rules.

Your load balancer or API gateway vendor guide remains authoritative for whether Basic terminates at the edge or is forwarded to upstream pods.

Copy-paste reference

Use Basic Auth Generator with staging:CorrectHorse — the tool prints the header line below (not your password on WoDeTool servers).

Authorization: Basic c3RhZ2luZzpDb3JyZWN0SG9yc2U=

Related tools

Related guides