---
title: "API Token Generator – pwgen.de"
description: "Cryptographically secure tokens for APIs, secrets, and applications."
canonical_url: "https://pwgen.de/en/token-generator"
meta:
  "og:description": "Cryptographically secure tokens for APIs, secrets, and applications."
  "og:image": "https://pwgen.de/_og/s/o_da6859aabc6f3851.png"
  "og:image:height": "630"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "API Token Generator – pwgen.de"
  "twitter:image": "https://pwgen.de/_og/s/o_da6859aabc6f3851.png"
---

> Index of every page on this site: [llms.txt](https://pwgen.de/llms.txt)

# **API Token Generator**

Cryptographically secure tokens for APIs, secrets, and applications.

Length: 16

Format

API keys, session tokens, and secrets should always be created with a cryptographically secure random generator. Choose from Base62, Base58, Hex, or NanoID.

## **Frequently asked questions**

Base62 is the default for API keys. Base58 drops 0, O, I and l, which helps when people retype or read out the value. Hex suits systems that expect a hexadecimal string. NanoID gives you a URL-safe identifier.

Aim for at least 128 bits of entropy — roughly 22 characters in Base62 or 32 characters in hex. For long-lived secrets that cannot be rotated regularly, 256 bits is the safer choice.

Both use the same procedure, and the API logs nothing. If you want maximum control, use the in-browser generator: the value is then created on your device and never travels across the network.

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://pwgen.de/en#website","@type":"WebSite","description":"Kostenloser, datenschutzfreundlicher Passwort-Generator. Generierung direkt im Browser – keine Passwörter werden gespeichert.","inLanguage":"en-US","name":"pwgen.de","url":"https://pwgen.de/en","publisher":{"@id":"https://pwgen.de/#identity"},"translationOfWork":{"@id":"https://pwgen.de/#website"}},{"@id":"https://pwgen.de/en/token-generator#webpage","description":"Cryptographically secure tokens for APIs, secrets, and applications.","name":"API Token Generator","url":"https://pwgen.de/en/token-generator","@type":["WebPage","FAQPage"],"isPartOf":{"@id":"https://pwgen.de/en#website"},"mainEntity":[{"@id":"https://pwgen.de/en/token-generator#/schema/question/1"},{"@id":"https://pwgen.de/en/token-generator#/schema/question/2"},{"@id":"https://pwgen.de/en/token-generator#/schema/question/3"}],"potentialAction":[{"@type":"ReadAction","target":["https://pwgen.de/en/token-generator"]}],"primaryImageOfPage":{"@id":"https://pwgen.de/#logo"}},{"@id":"https://pwgen.de/#identity","@type":"Organization","email":"info@htrs.io","legalName":"GbR HTRS i/o","name":"HTRS i/o","telephone":"+49 221 292 513 03","url":"https://pwgen.de","vatID":"DE359532582","address":{"@type":"PostalAddress","streetAddress":"Gotenring 9","addressLocality":"Köln","postalCode":"50679","addressCountry":"DE"},"logo":{"@id":"https://pwgen.de/#logo"},"sameAs":["https://htrs.io"]},{"@id":"https://pwgen.de/en/token-generator#/schema/software-application/1","@type":"SoftwareApplication","applicationCategory":"SecurityApplication","name":"pwgen.de Token Generator","operatingSystem":"Web Browser","offers":{"@type":"Offer","availability":"https://schema.org/InStock","price":"0","priceCurrency":"EUR","priceValidUntil":"2027-12-30T00:00:00.000Z"}},{"@id":"https://pwgen.de/en/token-generator#/schema/question/1","@type":"Question","inLanguage":"en","name":"Which token format should I choose?","acceptedAnswer":{"@type":"Answer","text":"Base62 is the default for API keys. Base58 drops 0, O, I and l, which helps when people retype or read out the value. Hex suits systems that expect a hexadecimal string. NanoID gives you a URL-safe identifier."}},{"@id":"https://pwgen.de/en/token-generator#/schema/question/2","@type":"Question","inLanguage":"en","name":"How long does an API token need to be?","acceptedAnswer":{"@type":"Answer","text":"Aim for at least 128 bits of entropy — roughly 22 characters in Base62 or 32 characters in hex. For long-lived secrets that cannot be rotated regularly, 256 bits is the safer choice."}},{"@id":"https://pwgen.de/en/token-generator#/schema/question/3","@type":"Question","inLanguage":"en","name":"Should I generate tokens in the browser or through the API?","acceptedAnswer":{"@type":"Answer","text":"Both use the same procedure, and the API logs nothing. If you want maximum control, use the in-browser generator: the value is then created on your device and never travels across the network."}},{"@id":"https://pwgen.de/#logo","@type":"ImageObject","caption":"HTRS i/o","contentUrl":"https://pwgen.de/apple-touch-icon.png","inLanguage":"en","url":"https://pwgen.de/apple-touch-icon.png"}]}
```

## Sitemap

See the full [sitemap](https://pwgen.de/sitemap.md) for all pages.
