---
title: "Laravel APP_KEY Generator – pwgen.de"
description: "A valid Laravel APP_KEY: 32 random bytes, base64-encoded, generated in your browser."
canonical_url: "https://pwgen.de/en/laravel-app-key-generator"
meta:
  "og:description": "A valid Laravel APP_KEY: 32 random bytes, base64-encoded, generated in your browser."
  "og:image": "https://pwgen.de/_og/s/o_6a2bd98b3d43a17f.png"
  "og:image:height": "630"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "Laravel APP_KEY Generator – pwgen.de"
  "twitter:image": "https://pwgen.de/_og/s/o_6a2bd98b3d43a17f.png"
---

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

# **Laravel APP\_KEY Generator**

A valid Laravel APP\_KEY: 32 random bytes, base64-encoded, generated in your browser.

Very strong**0 bits**Generated in your browser

## **Local alternative**

`php artisan key:generate`

Prefer generating secrets on the machine that uses them? This command produces an equivalent value.

[Official documentation](https://laravel.com/docs/encryption)

Laravel encrypts sessions, cookies and everything passed through the Crypt facade with the APP\_KEY. The value is base64 of exactly 32 bytes, which is why it carries the base64: prefix. Replacing the key of a running application makes already-encrypted data and existing sessions undecryptable.

## **Frequently asked questions**

Into the APP\_KEY environment variable, usually in your project's .env file. The value carries the base64: prefix — copy it in full, Laravel decodes the part after it to exactly 32 bytes.

Anything encrypted with the old key can no longer be decrypted: existing sessions, encrypted cookies and every value stored through the Crypt facade. In a running application, replace it only deliberately and with a migration plan.

Yes, the result is equivalent: 32 random bytes in Base64. The only difference is where they are created — here in your browser, there on the machine running the command.

```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/laravel-app-key-generator#webpage","description":"A valid Laravel APP_KEY: 32 random bytes, base64-encoded, generated in your browser.","name":"Laravel APP_KEY Generator","url":"https://pwgen.de/en/laravel-app-key-generator","@type":["WebPage","FAQPage"],"breadcrumb":{"@id":"https://pwgen.de/en/laravel-app-key-generator#breadcrumb"},"isPartOf":{"@id":"https://pwgen.de/en#website"},"mainEntity":[{"@id":"https://pwgen.de/en/laravel-app-key-generator#/schema/question/1"},{"@id":"https://pwgen.de/en/laravel-app-key-generator#/schema/question/2"},{"@id":"https://pwgen.de/en/laravel-app-key-generator#/schema/question/3"}],"potentialAction":[{"@type":"ReadAction","target":["https://pwgen.de/en/laravel-app-key-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/laravel-app-key-generator#/schema/software-application/1","@type":"SoftwareApplication","applicationCategory":"DeveloperApplication","name":"pwgen.de – Laravel APP_KEY 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/laravel-app-key-generator#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"pwgen.de","item":"https://pwgen.de/en","position":1},{"@type":"ListItem","name":"Secrets","item":"https://pwgen.de/en/secrets","position":2},{"@type":"ListItem","name":"Laravel APP_KEY Generator","position":3}]},{"@id":"https://pwgen.de/en/laravel-app-key-generator#/schema/question/1","@type":"Question","inLanguage":"en","name":"Where does the APP_KEY go?","acceptedAnswer":{"@type":"Answer","text":"Into the APP_KEY environment variable, usually in your project's .env file. The value carries the base64: prefix — copy it in full, Laravel decodes the part after it to exactly 32 bytes."}},{"@id":"https://pwgen.de/en/laravel-app-key-generator#/schema/question/2","@type":"Question","inLanguage":"en","name":"What happens if I replace the APP_KEY?","acceptedAnswer":{"@type":"Answer","text":"Anything encrypted with the old key can no longer be decrypted: existing sessions, encrypted cookies and every value stored through the Crypt facade. In a running application, replace it only deliberately and with a migration plan."}},{"@id":"https://pwgen.de/en/laravel-app-key-generator#/schema/question/3","@type":"Question","inLanguage":"en","name":"Is this the same as php artisan key:generate?","acceptedAnswer":{"@type":"Answer","text":"Yes, the result is equivalent: 32 random bytes in Base64. The only difference is where they are created — here in your browser, there on the machine running the command."}},{"@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.
