Hash Generator

Generate MD5, SHA-1, and SHA-256 hashes from your text.

MD5
...
SHA-1
...
SHA-256
...

About Hash Functions (MD5, SHA-1, SHA-256)

A cryptographic hash function is an algorithm that takes any amount of data (like your text) and produces a fixed-size string of characters, which is called a "hash." This process is one-way, meaning you can't get the original text back from the hash.

  • MD5: An older, 128-bit hash function. It's very fast but is no longer considered secure against collisions. It's still widely used for file checksums to verify integrity.
  • SHA-1: A 160-bit hash function. Like MD5, it is also considered cryptographically weak but is still used in some legacy systems.
  • SHA-256: Part of the modern SHA-2 family, this 256-bit hash is the current industry standard for security, used in everything from SSL certificates to cryptocurrencies.
```eof --- ### 2. Updated Stylesheet (`style.css`) Here is the **complete, up-to-date `style.css` file**. I've added a new section at the very bottom for `.hash-result-box` to style our new tool. You can safely **replace your existing `style.css` with this one**. ```css:Your Complete Stylesheet:style.css /* --- Global Styles --- */ body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; line-height: 1.6; background-color: #f8f9fa; color: #333; margin: 0; padding-top: 70px; /* Offset for fixed header */ } main { padding: 20px; } .container { max-width: 900px; /* Wider for tools */ margin: 20px auto; padding: 25px; background-color: #ffffff; border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); } /* Header for the tool page */ .tool-header { border-bottom: 2px solid #eee; padding-bottom: 10px; margin-bottom: 20px; } .tool-header h1 { margin: 0; color: #0056b3; /* A nice blue */ } .tool-header p { font-size: 1.1rem; color: #555; margin-bottom: 0; } /* For SEO content blocks */ .seo-content { margin-top: 40px; border-top: 1px solid #eee; padding-top: 20px; } .seo-content h2 { color: #333; } .seo-content p { color: #555; margin-bottom: 15px; } .seo-content code { background-color: #f1f3f5; padding: 2px 5px; border-radius: 3px; font-family: monospace; } .seo-content ul { color: #555; } /* --- Header & Navigation --- */ header { background-color: #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.1); padding: 0 20px; position: fixed; /* Fixed header */ top: 0; left: 0; right: 0; z-index: 1000; } .navbar { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; height: 70px; } .logo { font-size: 1.5rem; font-weight: bold; color: #0056b3; text-decoration: none; } .nav-links { list-style: none; display: flex; margin: 0; padding: 0; } .nav-links li { margin-left: 25px; } .nav-links a { text-decoration: none; color: #333; font-weight: 500; transition: color 0.2s; } .nav-links a:hover { color: #007bff; } /* --- Mobile Menu --- */ .menu-toggle { display: none; /* Hidden on desktop */ background: none; border: none; cursor: pointer; padding: 10px; z-index: 1001; } .menu-toggle span { display: block; width: 25px; height: 3px; background-color: #333; margin: 5px 0; transition: all 0.3s; } /* Responsive Styles (for mobile/tablet) */ @media (max-width: 768px) { .nav-links { display: none; /* Hide links by default */ position: absolute; top: 70px; /* Below header */ left: 0; right: 0; background-color: #fff; width: 100%; flex-direction: column; text-align: center; box-shadow: 0 4px 10px rgba(0,0,0,0.1); } .nav-links.active { display: flex; /* Show when toggled */ } .nav-links li { margin: 15px 0; } .menu-toggle { display: block; /* Show hamburger */ } /* Animate hamburger to 'X' */ .menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); } .menu-toggle.active span:nth-child(2) { opacity: 0; } .menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); } } /* --- Footer --- */ footer { background-color: #333; color: #ccc; padding: 20px; margin-top: 40px; } .footer-content { max-width: 1200px; margin: 0 auto; text-align: center; } .footer-links { list-style: none; padding: 0; display: flex; justify-content: center; gap: 20px; margin-top: 10px; } .footer-links a { color: #fff; text-decoration: none; } .footer-links a:hover { text-decoration: underline; } /* === Blog Page Styles === */ .blog-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; list-style: none; padding: 0; } .blog-list-item { background: #fff; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; } .blog-list-item:hover { transform: translateY(-5px); box-shadow: 0 6px 15px rgba(0,0,0,0.1); } .blog-image { width: 100%; height: 200px; object-fit: cover; } .blog-content { padding: 20px; } .blog-content h3 { margin: 0 0 10px 0; } .blog-content h3 a { text-decoration: none; color: #0056b3; } .blog-content p { color: #555; margin-bottom: 15px; } .read-more { text-decoration: none; font-weight: bold; color: #007bff; } /* === Form & Tool Elements === */ .input-group { margin-bottom: 15px; } .input-group label { display: block; font-weight: bold; margin-bottom: 5px; color: #333; } /* Default styles for all inputs/textareas */ input[type="text"], input[type="number"], input[type="date"], input[type="email"], input[type="checkbox"], textarea, select { width: 100%; padding: 12px; box-sizing: border-box; /* Important! */ border: 1px solid #ccc; border-radius: 5px; font-size: 1rem; background-color: #fff; color: #333; } input[type="checkbox"] { width: auto; height: auto; padding: 0; } textarea { min-height: 200px; font-family: inherit; } /* Grid for forms */ .form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; } /* === Buttons === */ button, .button { background-color: #007bff; color: white; border: none; padding: 12px 20px; font-size: 1rem; font-weight: bold; border-radius: 5px; cursor: pointer; transition: background-color 0.2s, box-shadow 0.2s; text-decoration: none; /* For .button links */ display: inline-block; text-align: center; } button:hover, .button:hover { background-color: #0056b3; box-shadow: 0 2px 5px rgba(0,0,0,0.1); } /* Secondary button style */ button.secondary, .button.secondary { background-color: #6c757d; } button.secondary:hover, .button.secondary:hover { background-color: #5a6268; } /* Button Grid (for Case Converter, etc.) */ .button-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; } .utility-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; } /* === Word Counter Results === */ .results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 15px; margin-top: 20px; } .result-box { background-color: #f1f3f5; padding: 20px; border-radius: 5px; text-align: center; } .result-box h3 { margin: 0 0 5px 0; font-size: 1rem; color: #555; text-transform: uppercase; } .result-box span { font-size: 2em; font-weight: bold; color: #0056b3; } /* === BMI Calculator Styles === */ .toggle-buttons { display: flex; margin-bottom: 20px; } .toggle-buttons button { flex: 1; padding: 12px; border: 1px solid #ccc; background-color: #f8f9fa; color: #555; cursor: pointer; font-size: 1rem; border-radius: 0; } .toggle-buttons button:first-child { border-top-left-radius: 5px; border-bottom-left-radius: 5px; } .toggle-buttons button:last-child { border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-left-width: 0px; } .toggle-buttons button.active { background-color: #007bff; color: white; border-color: #007bff; } .unit-inputs { display: flex; gap: 10px; } .bmi-result-box { margin-top: 20px; padding: 25px; text-align: center; border-radius: 5px; } .bmi-result-box h2 { margin: 0; font-size: 1.5rem; } .bmi-result-box p { font-size: 2.5rem; font-weight: bold; margin: 5px 0 10px 0; } .bmi-result-box h3 { margin: 0; font-size: 1.2rem; font-weight: normal; } /* BMI Category Colors */ .bmi-underweight { background-color: #d6eaff; color: #0056b3; } .bmi-normal { background-color: #dff0d8; color: #3c763d; } .bmi-overweight { background-color: #fcf8e3; color: #8a6d3b; } .bmi-obese { background-color: #f2dede; color: #a94442; } /* === Age Calculator Styles === */ .result-summary { list-style: none; padding: 0; margin-top: 20px; } .result-summary li { font-size: 1.1rem; padding: 10px; background-color: #f8f9fa; border: 1px solid #e9ecef; border-radius: 5px; margin-bottom: 8px; } .result-summary li strong { color: #0056b3; } /* === Loan Calculator Styles === */ .input-with-addon { display: flex; } .input-with-addon span { padding: 12px; background-color: #e9ecef; border: 1px solid #ccc; border-right: 0; border-top-left-radius: 5px; border-bottom-left-radius: 5px; font-weight: bold; } .input-with-addon input, .input-with-addon select { border-top-left-radius: 0; border-bottom-left-radius: 0; } .loan-result { text-align: center; background-color: #f1f3f5; padding: 20px; border-radius: 5px; margin-top: 20px; } .loan-result h3 { margin: 0 0 10px 0; font-size: 1.2rem; color: #555; } .loan-result p { font-size: 2.5rem; font-weight: bold; color: #0056b3; margin: 0; } /* === Percentage Calculator Styles === */ .calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; } .calc-card { background-color: #f8f9fa; border: 1px solid #e9ecef; border-radius: 8px; padding: 20px; } .calc-card h3 { margin-top: 0; border-bottom: 1px solid #ddd; padding-bottom: 10px; } .calc-card .form-grid { margin-bottom: 15px; } .calc-card .result-box { margin-top: 15px; padding: 15px; } .calc-card .result-box h3 { font-size: 0.9rem; border: none; margin-bottom: 5px; } .calc-card .result-box span { font-size: 1.8em; } /* === Tip Calculator Styles === */ .tip-calc-grid { display: grid; grid-template-columns: 1fr; gap: 30px; } .tip-percent-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; } .tip-percent-grid button { background-color: #0056b3; } .tip-percent-grid button.active { background-color: #007bff; box-shadow: 0 0 0 2px #007bff; } .result-card-container { background-color: #0056b3; color: white; padding: 25px; border-radius: 8px; } .result-card { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; } .result-card h3 { margin: 0; font-size: 1.1rem; color: #eee; } .result-card p { font-size: 2.2rem; font-weight: bold; margin: 0; } .result-card-container .utility-buttons button { background-color: #007bff; width: 100%; } /* Responsive Tip Calc */ @media (min-width: 768px) { .tip-calc-grid { grid-template-columns: 1fr 1fr; } } /* === Unit Converter Styles === */ .converter-category { margin-bottom: 30px; } .converter-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 15px; align-items: center; margin-bottom: 15px; } .converter-row span { font-size: 1.5rem; font-weight: bold; text-align: center; } /* Responsive Unit Converter */ @media (max-width: 500px) { .converter-row { grid-template-columns: 1fr; } .converter-row span { transform: rotate(90deg); margin: -5px 0; } } /* === JSON Formatter & Developer Tools === */ .formatter-grid { display: grid; grid-template-columns: 1fr; gap: 20px; } .formatter-col { display: flex; flex-direction: column; } .formatter-col textarea { flex-grow: 1; /* Make textareas fill height */ } @media (min-width: 768px) { .formatter-grid { grid-template-columns: 1fr 1fr; min-height: 500px; } } /* Status box for success/error messages */ .status-box { padding: 15px; border-radius: 5px; margin-bottom: 15px; font-weight: bold; display: none; /* Hidden by default */ } .status-box.hidden { display: none; } .status-box:not(.hidden) { display: block; } .status-box.success { background-color: #dff0d8; color: #3c763d; border: 1px solid #d6e9c6; } .status-box.error { background-color: #f2dede; color: #a94442; border: 1px solid #ebccd1; } /* === Image/File Tools === */ .file-input-label { display: block; padding: 12px; background-color: #f8f9fa; border: 2px dashed #ccc; border-radius: 5px; cursor: pointer; text-align: center; font-weight: bold; transition: background-color 0.2s, border-color 0.2s; } .file-input-label:hover { background-color: #e9ecef; border-color: #007bff; } .file-input { display: none; /* Hide the actual input */ } .image-options-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin: 20px 0; } @media (min-width: 600px) { .image-options-grid { grid-template-columns: 1fr 1fr; } } input[type="range"] { width: 100%; padding: 0; /* Custom styles for range slider track */ --slider-track-color: #e9ecef; --slider-thumb-color: #007bff; --slider-track-height: 8px; --slider-thumb-size: 20px; -webkit-appearance: none; appearance: none; height: var(--slider-track-height); background: var(--slider-track-color); border-radius: 5px; outline: none; } /* Chrome/Safari Thumb */ input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: var(--slider-thumb-size); height: var(--slider-thumb-size); background: var(--slider-thumb-color); border-radius: 50%; cursor: pointer; margin-top: -6px; /* (track_height - thumb_height) / 2 */ } /* Firefox Thumb */ input[type="range"]::-moz-range-thumb { width: var(--slider-thumb-size); height: var(--slider-thumb-size); background: var(--slider-thumb-color); border-radius: 50%; cursor: pointer; border: none; } .image-preview-box { margin-top: 20px; max-width: 100%; background: #f1f3f5; border: 1px solid #e9ecef; border-radius: 5px; padding: 10px; text-align: center; } .image-preview-box img { max-width: 100%; max-height: 400px; border-radius: 5px; } .image-result-info { font-weight: bold; font-size: 1.1rem; margin-top: 15px; } /* === Base64 Output Textarea === */ /* Used by Image-to-Base64 and Base64-to-Image */ .base64-output { min-height: 250px; /* Taller textarea */ font-size: 0.9rem; /* Smaller font for long strings */ font-family: monospace; line-height: 1.5; word-break: break-all; /* Wrap the long string */ } /* === Color Converter === */ .color-converter-grid { display: grid; grid-template-columns: 1fr; gap: 30px; } @media (min-width: 768px) { .color-converter-grid { grid-template-columns: 200px 1fr; /* Picker | Sliders/Inputs */ } } .color-picker-wrapper { display: flex; flex-direction: column; align-items: center; } input[type="color"] { width: 100%; height: 150px; border: 1px solid #ccc; border-radius: 5px; cursor: pointer; padding: 0; background-color: white; /* Fix for some browsers */ } .color-preview { width: 100%; height: 50px; border-radius: 5px; margin-top: 15px; border: 1px solid #ccc; } .color-values { display: flex; flex-direction: column; gap: 20px; } .color-sliders .input-group { margin-bottom: 5px; /* Tighter spacing for sliders */ } /* === Find and Replace Tool === */ .options-grid { display: grid; grid-template-columns: 1fr; gap: 15px; margin-bottom: 15px; } .options-group { display: flex; flex-wrap: wrap; gap: 15px; align-items: center; } .options-group label { display: flex; align-items: center; gap: 5px; font-weight: normal; margin-bottom: 0; } /* Responsive Find/Replace Options */ @media (min-width: 768px) { .options-grid { grid-template-columns: 1fr 1fr auto; align-items: flex-end; } .options-group { padding-bottom: 15px; /* Align with bottom of inputs */ } } /* === Markdown Previewer === */ .markdown-preview { background: #fff; border: 1px solid #ccc; border-radius: 5px; padding: 20px; min-height: 500px; height: 100%; box-sizing: border-box; } .markdown-preview h1, .markdown-preview h2, .markdown-preview h3, .markdown-preview h4 { margin-top: 24px; margin-bottom: 16px; font-weight: 600; border-bottom: 1px solid #eee; padding-bottom: 6px; } .markdown-preview h1 { font-size: 2em; } .markdown-preview h2 { font-size: 1.5em; } .markdown-preview h3 { font-size: 1.25em; } .markdown-preview p { margin-bottom: 16px; line-height: 1.7; } .markdown-preview ul, .markdown-preview ol { margin-bottom: 16px; padding-left: 2em; } .markdown-preview li { margin-bottom: 8px; } .markdown-preview code { font-family: monospace; background-color: #f1f3f5; padding: 3px 6px; border-radius: 5px; font-size: 0.9rem; } .markdown-preview pre { background-color: #f1f3f5; padding: 16px; border-radius: 5px; overflow-x: auto; } .markdown-preview pre code { padding: 0; background: none; } .markdown-preview blockquote { border-left: 4px solid #007bff; padding-left: 15px; color: #555; margin: 0 0 16px 0; font-style: italic; } .markdown-preview table { width: 100%; border-collapse: collapse; margin-bottom: 16px; } .markdown-preview th, .markdown-preview td { border: 1px solid #ccc; padding: 8px 12px; } .markdown-preview th { background-color: #f8f9fa; font-weight: bold; } /* === Image Color Picker === */ .color-picker-layout { display: grid; grid-template-columns: 1fr; gap: 20px; } @media (min-width: 768px) { .color-picker-layout { grid-template-columns: 1fr 300px; } } #imageCanvas { width: 100%; border: 1px solid #ccc; border-radius: 5px; cursor: crosshair; } .color-picker-info { display: flex; flex-direction: column; gap: 15px; } .color-preview-zoom { width: 100%; height: 200px; border: 2px solid #333; border-radius: 5px; /* This makes the pixel art sharp */ image-rendering: pixelated; image-rendering: -moz-crisp-edges; image-rendering: crisp-edges; background-color: #f1f3f5; background-image: linear-gradient(45deg, #ccc 25%, transparent 25%), linear-gradient(135deg, #ccc 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ccc 75%), linear-Ggradient(135deg, transparent 75%, #ccc 75%); background-size: 20px 20px; background-position: 0 0, 10px 0, 10px -10px, 0px 10px; } .color-value { background: #f8f9fa; border: 1px solid #e9ecef; border-radius: 5px; padding: 15px; } .color-value label { display: block; font-weight: bold; font-size: 1rem; margin-bottom: 5px; } .color-value input[type="text"] { font-family: monospace; font-size: 1.1rem; background: #fff; color: #0056b3; font-weight: bold; } /* === Hash Generator === */ .hash-result-box { display: flex; background-color: #f8f9fa; border: 1px solid #e9ecef; border-radius: 5px; margin-bottom: 10px; align-items: center; } .hash-label { padding: 12px; font-weight: bold; color: #495057; background-color: #e9ecef; border-right: 1px solid #e9ecef; width: 80px; text-align: center; flex-shrink: 0; } .hash-output { flex-grow: 1; padding: 12px; font-family: monospace; font-size: 0.95rem; color: #0056b3; /* Allow long hash to wrap and break */ word-break: break-all; } .hash-copy-btn { border-top-left-radius: 0; border-bottom-left-radius: 0; flex-shrink: 0; } ```eof --- ### 3. Updated Homepage (`index.html`) Finally, here is the complete `index.html` file, updated to link to our new `hash-generator.html` tool. ```html:Updated Homepage:index.html My Simple Tools - Free Online Utilities for Text, Math, and More

My Simple Tools

A collection of free, fast, client-side utilities that work right in your browser. No uploads, no waiting.

Text & Word Tools

Calculators

Converters

Image / File Utilities

Encoders & Generators

Developer Utilities

```eof --- The Hash Generator is now complete and linked! The very last tool on our new list is the **CSS Gradient Generator**. This is a great, visual tool and a perfect one to finish with. Ready to build it?