⚡
usefultools.dev
Auth

Basic Auth Header Generator

NEW

Turn a username and password into an HTTP Authorization: Basic header with curl and fetch snippets, or decode a header back.

Runs 100% in your browser — your input is never uploaded or stored on our servers.

Basic authentication only encodes the credentials, it does not encrypt them. Anyone who sees the header can read the password, so use it only over HTTPS.

Create a header

Decode a header

⚡

Quick Examples

Typical inputs and the results this tool produces.

Header
Aladdin and open sesame
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
UTF-8
jürgen and pässwort
Authorization: Basic asO8cmdlbjpww6Rzc3dvcnQ=
curl
Aladdin and open sesame (curl)
curl -u 'Aladdin:open sesame' 'https://example.com/api'
Decode
Authorization: Basic dXNlcjo=
Username user, empty password
📖

Overview

HTTP Basic authentication sends credentials in an Authorization header: the word Basic, a space, and the Base64 encoding of username:password. It is simple and supported by almost every server, proxy and API client, which makes it handy for testing and internal tools.

This generator builds the header for you, encoding the text as UTF-8 so accented and non-Latin characters survive, and prints matching curl -u and fetch examples. You can also paste a header to see the username and password inside. Base64 is not encryption, so only send Basic credentials over HTTPS.

Use it for quick tests against staging servers, webhooks and internal dashboards. Basic authentication is a weak scheme on its own: the header can be read by anyone who sees the request, so never use real production passwords on a shared or untrusted computer.

Why use this tool?

  • Build a correct header without a terminal or script
  • Handles non-ASCII usernames and passwords as UTF-8
  • Get ready-to-paste curl and fetch snippets
  • Decode a header to debug a failing login
⭐

Features

🔑

Header builder

Outputs the full Authorization: Basic line plus the bare token.

🌍

UTF-8 safe

Characters like ü, é or 日本 are encoded as UTF-8 before Base64.

💻

curl and fetch

Copy a curl -u command or a JavaScript fetch call for your URL.

🔓

Header decoder

Paste a full header or just the Base64 part to read user and password.

👁️

Show or hide

The password field is masked until you choose to reveal it.

🔒

Runs locally

Nothing you type is sent anywhere or stored.

🛠️

How to Use

1

Enter credentials

Type the username and password, plus the URL you want in the snippets.

2

Copy the output

Copy the header, the curl command or the fetch code.

3

Send over HTTPS

Use the header only on HTTPS requests so it cannot be read in transit.

4

Decode when debugging

Paste an existing header into the decoder to see what it contains.

🤔

Frequently Asked Questions