{"id":9318,"date":"2024-01-14T18:01:00","date_gmt":"2024-01-14T18:01:00","guid":{"rendered":"https:\/\/codehim.com\/?p=9318"},"modified":"2024-01-22T16:02:16","modified_gmt":"2024-01-22T11:02:16","slug":"javascript-password-generator-with-rules","status":"publish","type":"post","link":"https:\/\/codehim.com\/text-input\/javascript-password-generator-with-rules\/","title":{"rendered":"JavaScript Password Generator with Rules"},"content":{"rendered":"<p>This JavaScript code snippet helps you to create a user-friendly password generator. It lets you customize password length and criteria (lowercase, uppercase, numbers, symbols) for secure and tailored password generation. The core function is to generate and display passwords based on user-defined rules. It&#8217;s a handy tool for quickly generating strong passwords.<\/p>\n<p>It&#8217;s helpful for user registration or <a href=\"https:\/\/codehim.com\/bootstrap\/reset-password-form-bootstrap-5\/\" target=\"_blank\" rel=\"noopener\">password reset forms<\/a>, ensuring users create robust and unique passwords.<\/p>\n<h2>How to Create a Password Generator with Rules using JavaScript<\/h2>\n<p>1. Start by creating the HTML structure for your password generator. You can place this code inside your HTML file.<\/p>\n<pre class=\"prettyprint linenums lang-html\">&lt;div id=\"password-generator\"&gt;\r\n\r\n    &lt;input value=\"Password generator\" id=\"password-output\"&gt;\r\n\r\n    &lt;div class=\"range\"&gt;\r\n      &lt;input \r\n        type=\"range\"\r\n        min=\"4\"\r\n        max=\"24\"\r\n        step=\"1\"\r\n        value=\"8\"\r\n        id=\"password-length\"\r\n        oninput=\"document.getElementById('display-password-length').value=this.value\"\r\n      &gt;\r\n      &lt;input \r\n        type=\"text\"\r\n        value=\"8\"\r\n        maxlength=\"2\"\r\n        id=\"display-password-length\"\r\n        oninput=\"document.getElementById('password-length').value=this.value\"\r\n      &gt;\r\n    &lt;\/div&gt;\r\n\r\n    &lt;div class=\"flex\"&gt;\r\n      &lt;input type=\"checkbox\" id=\"lowercase\" checked=\"checked\"&gt;\r\n      &lt;label for=\"lowercase\"&gt;a-z&lt;\/label&gt;\r\n\r\n      &lt;input type=\"checkbox\" id=\"uppercase\"&gt;\r\n      &lt;label for=\"uppercase\"&gt;A-Z&lt;\/label&gt;\r\n\r\n      &lt;input type=\"checkbox\" id=\"numbers\"&gt;\r\n      &lt;label for=\"numbers\"&gt;0-9&lt;\/label&gt;\r\n\r\n      &lt;input type=\"checkbox\" id=\"symbols\"&gt;\r\n      &lt;label for=\"symbols\"&gt;!-?&lt;\/label&gt;\r\n    &lt;\/div&gt;\r\n\r\n    &lt;button id=\"generateButton\" type=\"button\" onclick=\"generatePassword()\"&gt;Generate&lt;\/button&gt;\r\n\r\n  &lt;\/div&gt;<\/pre>\n<p>2. Use the following CSS code to style your password generator. This CSS code ensures a visually appealing and user-friendly interface.<\/p>\n<pre class=\"prettyprint linenums lang-css\">@import url(\"https:\/\/fonts.googleapis.com\/css?family=Cuprum&amp;display=swap\");\r\n* {\r\n  box-sizing: border-box;\r\n  font-family: \"Cuprum\", sans-serif;\r\n}\r\n\r\ninput {\r\n  border: none;\r\n  background: transparent;\r\n  outline: none;\r\n}\r\n\r\nbody {\r\n  overflow: hidden;\r\n  margin: 0;\r\n  padding: 0;\r\n  display: flex;\r\n  align-items: center;\r\n  text-align: center;\r\n  height: 100vh;\r\n  background: #F44336;\r\n}\r\nbody #password-generator {\r\n  padding: 2rem;\r\n  margin: 0 auto;\r\n  width: 500px;\r\n  border-radius: 3px;\r\n  box-shadow: 0 0 2px #1f1f1f;\r\n  border: 3px solid #d5d4ff;\r\n  position: relative;\r\n  white-space: nowrap;\r\n}\r\nbody #password-generator #password-output {\r\n  text-align: center;\r\n  font-size: 2.5rem;\r\n  margin: 0 auto 1.2rem;\r\n  width: 100%;\r\n}\r\nbody #password-generator .range {\r\n  justify-content: space-between;\r\n  padding: 1rem 1rem 1rem 2.5rem;\r\n}\r\nbody #password-generator .range input[type=range] {\r\n  -webkit-appearance: none;\r\n  appearance: none;\r\n  width: 40%;\r\n  max-width: 100%;\r\n  height: 15px;\r\n  padding: 0px;\r\n  background: #d5d4ff;\r\n  outline: none;\r\n  opacity: 0.7;\r\n  -webkit-transition: 0.2s;\r\n  transition: opacity 0.2s;\r\n  box-shadow: 0 2px 35px rgba(0, 0, 0, 0.4555);\r\n  border-radius: 10px;\r\n  cursor: pointer;\r\n  scroll-behavior: smooth;\r\n  z-index: 1;\r\n}\r\nbody #password-generator .range input[type=range]::-webkit-slider-thumb {\r\n  -webkit-appearance: none;\r\n  appearance: none;\r\n  width: 15px;\r\n  height: 15px;\r\n  background: black;\r\n  cursor: pointer;\r\n  border-radius: 18px;\r\n  transition: 0.5s ease;\r\n}\r\nbody #password-generator .range input[type=range]::-webkit-slider-thumb:focus, body #password-generator .range input[type=range]::-webkit-slider-thumb:active {\r\n  padding: 16px;\r\n  box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);\r\n}\r\nbody #password-generator .range #display-password-length {\r\n  text-align: center;\r\n  font-size: 1.4rem;\r\n  width: 80px;\r\n  padding-top: 10px;\r\n}\r\nbody #password-generator .flex {\r\n  margin: 1rem 1rem 2rem;\r\n  display: flex;\r\n  justify-content: space-between;\r\n}\r\nbody #password-generator .flex input {\r\n  display: none;\r\n}\r\nbody #password-generator .flex input:checked + label {\r\n  background: #d5d4ff;\r\n  filter: brightness(120%);\r\n  transform: scale(1.1);\r\n}\r\nbody #password-generator .flex label {\r\n  border: 2px solid #d5d4ff;\r\n  border-radius: 4px;\r\n  padding: 0.8rem;\r\n  cursor: pointer;\r\n  font-size: 1.3rem;\r\n  text-align: center;\r\n  display: block;\r\n  width: 80px;\r\n  transition: 0.2s ease;\r\n}\r\nbody #password-generator .flex label:hover {\r\n  filter: sepia(70%);\r\n}\r\nbody #password-generator button {\r\n  outline: none;\r\n  background: #d5d4ff;\r\n  border: none;\r\n  padding: 1rem 2rem;\r\n  margin: 0.5rem 0;\r\n  border-radius: 3px;\r\n  box-shadow: 1px 1px 3px #1f1f1f;\r\n  text-transform: uppercase;\r\n  font-size: 1.2rem;\r\n  transition: 0.2s ease;\r\n  cursor: pointer;\r\n}\r\nbody #password-generator button:hover {\r\n  transform: translateX(4px);\r\n  filter: brightness(120%);\r\n}<\/pre>\n<p>3. Finally, add the JavaScript logic to make the password generator functional. This code defines the password criteria and generates the password accordingly.<\/p>\n<pre class=\"prettyprint linenums lang-js\">const passwordOutput =  document.getElementById('password-output');\r\nconst dataLowercase = \"azertyuiopqsdfghjklmwxcvbn\".split('');\r\nconst dataUppercase = \"AZERTYUIOPQSDFGHJKLMWXCVBN\".split('');\r\nconst dataNumbers = \"0123456789\".split('');\r\nconst dataSymbols = \"!@#$%^&amp;*-_=+\\|:;',.&gt;\/?~\".split('');\r\n\r\nfunction generatePassword() {\r\n\r\n  const data = [].concat(\r\n    lowercase.checked ? dataLowercase : [],\r\n    uppercase.checked ? dataUppercase : [],\r\n    numbers.checked ? dataNumbers : [],\r\n    symbols.checked ? dataSymbols : []\r\n  );\r\n\r\n  let passwordLength = parseInt(document.getElementById('display-password-length').value);\r\n  let newPassword = '';\r\n\r\n  if (data.length === 0) {\r\n    passwordOutput.innerHTML = \"G\u00e9n\u00e9rateur de MDP\";\r\n    alert('Please check at least one criteria');\r\n    return;\r\n  }\r\n\r\n  for (let i = 0; i &lt; passwordLength; i++) {\r\n    newPassword += data[Math.floor(Math.random() * data.length)];\r\n  }\r\n  passwordOutput.value = newPassword;\r\n  \r\n  passwordOutput.select();\r\n  document.execCommand('copy');\r\n  generateButton.innerHTML = \"Copied !\";\r\n  setTimeout(() =&gt; {generateButton.innerHTML = \"G\u00e9n\u00e9rer mot de passe\"}, 3500);\r\n\r\n}<\/pre>\n<p>You can customize this code by adding more criteria or changing the styling to match your website or application&#8217;s design. Once you&#8217;re satisfied, integrate it into your project, and ensure the &#8220;generatePassword()&#8221; function is called when the user clicks the &#8220;Generate&#8221; button.<\/p>\n<p>That&#8217;s it! hopefully, you have successfully created a JavaScript Password Generator With Rules. If you have any questions or suggestions, feel free to comment below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This JavaScript code snippet helps you to create a user-friendly password generator. It lets you customize password length and criteria&#8230;<\/p>\n","protected":false},"author":1,"featured_media":9334,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[97],"tags":[],"class_list":["post-9318","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-text-input"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>JavaScript Password Generator with Rules &#8212; CodeHim<\/title>\n<meta name=\"description\" content=\"Here is a free code snippet to create a JavaScript Password Generator with Rules. You can view demo and download the source code.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/codehim.com\/text-input\/javascript-password-generator-with-rules\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JavaScript Password Generator with Rules &#8212; CodeHim\" \/>\n<meta property=\"og:description\" content=\"Here is a free code snippet to create a JavaScript Password Generator with Rules. You can view demo and download the source code.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/codehim.com\/text-input\/javascript-password-generator-with-rules\/\" \/>\n<meta property=\"og:site_name\" content=\"CodeHim\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/codehimofficial\" \/>\n<meta property=\"article:published_time\" content=\"2024-01-14T18:01:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-22T11:02:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/codehim.com\/wp-content\/uploads\/2023\/10\/JavaScript-Password-Generator-with-Rules.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"960\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Asif Mughal\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@CodeHimOfficial\" \/>\n<meta name=\"twitter:site\" content=\"@CodeHimOfficial\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Asif Mughal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/codehim.com\/text-input\/javascript-password-generator-with-rules\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/codehim.com\/text-input\/javascript-password-generator-with-rules\/\"},\"author\":{\"name\":\"Asif Mughal\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed\"},\"headline\":\"JavaScript Password Generator with Rules\",\"datePublished\":\"2024-01-14T18:01:00+00:00\",\"dateModified\":\"2024-01-22T11:02:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/codehim.com\/text-input\/javascript-password-generator-with-rules\/\"},\"wordCount\":216,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/codehim.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/text-input\/javascript-password-generator-with-rules\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2023\/10\/JavaScript-Password-Generator-with-Rules.png\",\"articleSection\":[\"Text &amp; Input\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/codehim.com\/text-input\/javascript-password-generator-with-rules\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/codehim.com\/text-input\/javascript-password-generator-with-rules\/\",\"url\":\"https:\/\/codehim.com\/text-input\/javascript-password-generator-with-rules\/\",\"name\":\"JavaScript Password Generator with Rules &#8212; CodeHim\",\"isPartOf\":{\"@id\":\"https:\/\/codehim.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/codehim.com\/text-input\/javascript-password-generator-with-rules\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/text-input\/javascript-password-generator-with-rules\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2023\/10\/JavaScript-Password-Generator-with-Rules.png\",\"datePublished\":\"2024-01-14T18:01:00+00:00\",\"dateModified\":\"2024-01-22T11:02:16+00:00\",\"description\":\"Here is a free code snippet to create a JavaScript Password Generator with Rules. You can view demo and download the source code.\",\"breadcrumb\":{\"@id\":\"https:\/\/codehim.com\/text-input\/javascript-password-generator-with-rules\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/codehim.com\/text-input\/javascript-password-generator-with-rules\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codehim.com\/text-input\/javascript-password-generator-with-rules\/#primaryimage\",\"url\":\"https:\/\/codehim.com\/wp-content\/uploads\/2023\/10\/JavaScript-Password-Generator-with-Rules.png\",\"contentUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2023\/10\/JavaScript-Password-Generator-with-Rules.png\",\"width\":1280,\"height\":960,\"caption\":\"JavaScript Password Generator with Rules\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/codehim.com\/text-input\/javascript-password-generator-with-rules\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/codehim.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Text &amp; Input\",\"item\":\"https:\/\/codehim.com\/category\/text-input\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"JavaScript Password Generator with Rules\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/codehim.com\/#website\",\"url\":\"https:\/\/codehim.com\/\",\"name\":\"CodeHim\",\"description\":\"Web Design Code Snippets\",\"publisher\":{\"@id\":\"https:\/\/codehim.com\/#organization\"},\"alternateName\":\"Web Design Codes\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/codehim.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/codehim.com\/#organization\",\"name\":\"CodeHim - Web Design Code & Scripts\",\"url\":\"https:\/\/codehim.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg\",\"contentUrl\":\"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg\",\"width\":280,\"height\":280,\"caption\":\"CodeHim - Web Design Code & Scripts\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/codehimofficial\",\"https:\/\/x.com\/CodeHimOfficial\",\"https:\/\/www.instagram.com\/codehim\/\",\"https:\/\/www.linkedin.com\/company\/codehim\",\"https:\/\/co.pinterest.com\/codehim\/\",\"https:\/\/www.youtube.com\/@codehim\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed\",\"name\":\"Asif Mughal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g\",\"caption\":\"Asif Mughal\"},\"description\":\"I code and create web elements for amazing people around the world. I like work with new people. New people new Experiences. I truly enjoy what I'm doing, which makes me more passionate about web development and coding. I am always ready to do challenging tasks whether it is about creating a custom CMS from scratch or customizing an existing system.\",\"sameAs\":[\"https:\/\/codehim.com\"],\"url\":\"https:\/\/codehim.com\/author\/asif-mughal\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JavaScript Password Generator with Rules &#8212; CodeHim","description":"Here is a free code snippet to create a JavaScript Password Generator with Rules. You can view demo and download the source code.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/codehim.com\/text-input\/javascript-password-generator-with-rules\/","og_locale":"en_US","og_type":"article","og_title":"JavaScript Password Generator with Rules &#8212; CodeHim","og_description":"Here is a free code snippet to create a JavaScript Password Generator with Rules. You can view demo and download the source code.","og_url":"https:\/\/codehim.com\/text-input\/javascript-password-generator-with-rules\/","og_site_name":"CodeHim","article_publisher":"https:\/\/www.facebook.com\/codehimofficial","article_published_time":"2024-01-14T18:01:00+00:00","article_modified_time":"2024-01-22T11:02:16+00:00","og_image":[{"width":1280,"height":960,"url":"https:\/\/codehim.com\/wp-content\/uploads\/2023\/10\/JavaScript-Password-Generator-with-Rules.png","type":"image\/png"}],"author":"Asif Mughal","twitter_card":"summary_large_image","twitter_creator":"@CodeHimOfficial","twitter_site":"@CodeHimOfficial","twitter_misc":{"Written by":"Asif Mughal","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/codehim.com\/text-input\/javascript-password-generator-with-rules\/#article","isPartOf":{"@id":"https:\/\/codehim.com\/text-input\/javascript-password-generator-with-rules\/"},"author":{"name":"Asif Mughal","@id":"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed"},"headline":"JavaScript Password Generator with Rules","datePublished":"2024-01-14T18:01:00+00:00","dateModified":"2024-01-22T11:02:16+00:00","mainEntityOfPage":{"@id":"https:\/\/codehim.com\/text-input\/javascript-password-generator-with-rules\/"},"wordCount":216,"commentCount":0,"publisher":{"@id":"https:\/\/codehim.com\/#organization"},"image":{"@id":"https:\/\/codehim.com\/text-input\/javascript-password-generator-with-rules\/#primaryimage"},"thumbnailUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2023\/10\/JavaScript-Password-Generator-with-Rules.png","articleSection":["Text &amp; Input"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/codehim.com\/text-input\/javascript-password-generator-with-rules\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/codehim.com\/text-input\/javascript-password-generator-with-rules\/","url":"https:\/\/codehim.com\/text-input\/javascript-password-generator-with-rules\/","name":"JavaScript Password Generator with Rules &#8212; CodeHim","isPartOf":{"@id":"https:\/\/codehim.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/codehim.com\/text-input\/javascript-password-generator-with-rules\/#primaryimage"},"image":{"@id":"https:\/\/codehim.com\/text-input\/javascript-password-generator-with-rules\/#primaryimage"},"thumbnailUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2023\/10\/JavaScript-Password-Generator-with-Rules.png","datePublished":"2024-01-14T18:01:00+00:00","dateModified":"2024-01-22T11:02:16+00:00","description":"Here is a free code snippet to create a JavaScript Password Generator with Rules. You can view demo and download the source code.","breadcrumb":{"@id":"https:\/\/codehim.com\/text-input\/javascript-password-generator-with-rules\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codehim.com\/text-input\/javascript-password-generator-with-rules\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codehim.com\/text-input\/javascript-password-generator-with-rules\/#primaryimage","url":"https:\/\/codehim.com\/wp-content\/uploads\/2023\/10\/JavaScript-Password-Generator-with-Rules.png","contentUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2023\/10\/JavaScript-Password-Generator-with-Rules.png","width":1280,"height":960,"caption":"JavaScript Password Generator with Rules"},{"@type":"BreadcrumbList","@id":"https:\/\/codehim.com\/text-input\/javascript-password-generator-with-rules\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/codehim.com\/"},{"@type":"ListItem","position":2,"name":"Text &amp; Input","item":"https:\/\/codehim.com\/category\/text-input\/"},{"@type":"ListItem","position":3,"name":"JavaScript Password Generator with Rules"}]},{"@type":"WebSite","@id":"https:\/\/codehim.com\/#website","url":"https:\/\/codehim.com\/","name":"CodeHim","description":"Web Design Code Snippets","publisher":{"@id":"https:\/\/codehim.com\/#organization"},"alternateName":"Web Design Codes","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/codehim.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/codehim.com\/#organization","name":"CodeHim - Web Design Code & Scripts","url":"https:\/\/codehim.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codehim.com\/#\/schema\/logo\/image\/","url":"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg","contentUrl":"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg","width":280,"height":280,"caption":"CodeHim - Web Design Code & Scripts"},"image":{"@id":"https:\/\/codehim.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/codehimofficial","https:\/\/x.com\/CodeHimOfficial","https:\/\/www.instagram.com\/codehim\/","https:\/\/www.linkedin.com\/company\/codehim","https:\/\/co.pinterest.com\/codehim\/","https:\/\/www.youtube.com\/@codehim"]},{"@type":"Person","@id":"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed","name":"Asif Mughal","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codehim.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g","caption":"Asif Mughal"},"description":"I code and create web elements for amazing people around the world. I like work with new people. New people new Experiences. I truly enjoy what I'm doing, which makes me more passionate about web development and coding. I am always ready to do challenging tasks whether it is about creating a custom CMS from scratch or customizing an existing system.","sameAs":["https:\/\/codehim.com"],"url":"https:\/\/codehim.com\/author\/asif-mughal\/"}]}},"views":833,"_links":{"self":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts\/9318","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/comments?post=9318"}],"version-history":[{"count":0,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts\/9318\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/media\/9334"}],"wp:attachment":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/media?parent=9318"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/categories?post=9318"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/tags?post=9318"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}