Utvikling · verktøy

SHA-256-hashgenerator

Lim inn tekst og lag SHA-256-digesten i heksadesimalt format lokalt.

Kjøres i nettleseren. Ingen opplasting.

The text stays in this browser.

Om verktøyet

SHA-256-hashgenerator sem complicação.

Web Crypto API beregner hashen i nettleseren din. Hashing går bare én vei og krypterer eller skjuler ikke originalteksten.

Veiledning

Slik bruker du SHA-256-hashgenerator

The SHA-256 Hash Generator turns any text you type or paste into a SHA-256 digest: a fixed string of 64 hexadecimal characters that works as a fingerprint of that exact text. The same text always gives the same digest, and a one-character change gives a completely different one. It is not encryption, it cannot be reversed, and plain SHA-256 is not a way to store passwords. It hashes text, not files.

Slik gjør du

  1. Type or paste the text into the box. Spaces, line breaks and capital letters all count, so enter the text exactly as it must be fingerprinted.
  2. Press Create SHA-256 hash. The 64-character lowercase hexadecimal digest appears in the output box, and the status line says it was created locally.
  3. Press Copy hash to copy the digest. To compare two texts, hash both and check that the digests match character by character.
  4. Press Clear to empty both boxes when you are done, especially on a shared computer.

Eksempler

A standard short test text

Du skriver inn
Tekst
abc
Du får
SHA-256
5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03

The three letters abc are a widely used test input for SHA-256, so this digest is easy to compare against published values. Any correct tool must give exactly this result.

Kjørt med verktøyets egen kode.

Lower case against capital letter

Du skriver inn
Tekst
hello
Du får
SHA-256
2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824

Typing Hello with a capital H gives 185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969, a digest that shares nothing visible with this one. One changed letter changes everything.

Kjørt med verktøyets egen kode.

A hidden line break

Du skriver inn
Tekst
hello followed by one line break
Du får
SHA-256
5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03

Pressing Enter after hello adds a newline character, and the tool hashes it too. That is why a hash from a file ending in a new line often differs from the hash of the same words typed without one.

Kjørt med verktøyets egen kode.

Når det er nyttig

  • Create a fingerprint of a short text so you can later check that nobody changed one character of it.
  • Compare your result with a published SHA-256 value for a short test string while you learn about hashing.
  • Check that two copies of the same text are identical without reading them side by side.
  • Get a test digest for code, documentation or a classroom demonstration of one-way functions.

Begrensninger

  • It hashes text only, as UTF-8 bytes. It does not read files, so use a file checksum tool for downloads and documents.
  • Every character counts, including trailing spaces and line breaks. Text from different systems may differ in line endings, which gives different digests for words that look the same.
  • Hashing is one-way and is not encryption. Anyone who guesses a short or common input can hash it and compare, so a digest does not hide a weak secret. A plain SHA-256 digest is also not a way to store passwords, which need a salt and a deliberately slow method.
  • The browser feature behind it works only on secure pages (HTTPS or localhost). On other pages the tool shows an error instead of a hash.

Tips

  • Hash the same text twice to confirm your copy and paste did not add a space or a new line. Equal digests mean equal text.
  • Compare digests by pasting both into a search or diff box rather than by eye. Two different values often share the first few characters.
  • Do not paste secrets you cannot afford to expose. The page says the hash is made in your browser, but a clipboard or screen can still leak what you paste.

Kilder

Vanlige spørsmål

Sobre SHA-256-hashgenerator.

How do I create a SHA-256 hash from text?

Paste the text into the box and press Create SHA-256 hash. The tool encodes the text as UTF-8, passes it to the browser's built-in Web Crypto function and shows the result as 64 lowercase hexadecimal characters.

Is a SHA-256 hash the same as encryption?

No. Encryption can be undone with a key. A hash is a one-way fingerprint and has no key. You cannot get the original text back from the digest, although someone can test guesses against it.

Can I use SHA-256 to store passwords?

Not on its own. Guidance for password storage asks for a salt and a one-way key derivation method that is slow on purpose, which a single fast SHA-256 call is not. Use a dedicated password hashing method.

Why do I get a different hash for text that looks identical?

Something invisible differs: a trailing space, a line break, a different type of apostrophe or a different line-ending style. The tool hashes every character, so even a hidden one changes the whole digest.

What happens if I hash an empty box?

The tool still returns a digest, e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855. That is the SHA-256 value of zero bytes, so seeing it usually means the input was empty.

Does the text leave my device?

The page says the hash is made locally in your browser through the Web Crypto API, and its code calls only that function. The text is not sent anywhere by this tool, but you should still avoid pasting live secrets.

How long is a SHA-256 digest?

It is always 256 bits, shown as 64 hexadecimal characters, whatever the length of the input. A one-word text and a long essay both give a digest of the same size.

Hvordan bruker du SHA-256-hashgenerator?

Lim inn tekst og lag SHA-256-digesten i heksadesimalt format lokalt.

Lastes dataene mine opp til en server?

Nei. Behandlingen skjer i nettleseren din, og opplysningene dine lastes ikke opp.