Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import or require. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

              <!-- Intro -->
<div class="intro-box">
  <h2>Random password generator</h2>

<div class="wrapper">

  <!-- Fields -->
  <div class="fields-box">
    <label for="new-chars">
      <span>Enter posible chars</span>
      <input type="text" id="new-chars">
    </label><label for="new-length">
      <span>Set string length</span>
      <input type="number" id="new-length" min="1">
    </label><label for="new-num">
      <span>Set items number</span>
      <input type="number" id="new-num" min="1">

  <!-- Table -->
  <div class="table-box">
      <!-- Dynamic content! -->

  <!-- Buttons -->
  <div class="buttons-box">
    <button onclick="download();">Save</button>
    <button onclick="printTable();">Print</button>


<!-- Google Fonts -->
<link href=",400,700" rel="stylesheet">
              /* Global */
* {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;

html, body {
  min-height: 100%;

body {
  background: #80DEEA;
  background: -moz-linear-gradient(-45deg, #80DEEA 0%, #283593 100%);
  background: -webkit-linear-gradient(-45deg, #80DEEA 0%, #283593 100%);
  background: -o-linear-gradient(-45deg, #80DEEA 0%, #283593 100%);
  background: -ms-linear-gradient(-45deg, #80DEEA 0%, #283593 100%);
  background: linear-gradient(135deg, #80DEEA 0%, #283593 100%);
  font-family: 'Open Sans', sans-serif;
  color: #FFFFFF;

.wrapper {
  width: 90%;
  max-width: 620px;
  margin: 20px auto;
  border-radius: 3px;
  background: rgba(255,255,255,0.1);

/* Intro */
.intro-box {
  width: 80%;
  max-width: 820px;
  margin: 60px auto 40px auto;

.intro-box h2 {
  font-size: 2em;
  font-weight: 300;
  text-align: center;

/* Fields */
.fields-box {
  padding: 18px 5%;

.fields-box label {
  display: inline-block;
  width: 33.33%;
  padding: 6px 12px;

.fields-box label span {
  display: block;
  width: 100%;
  margin-bottom: 4px;
  font-size: .8em;
  color: #BBDEFB;

.fields-box label input {
  width: 100%;
  padding: 8px;
  color: #29B6F6;
  background: #FFFFFF;
  background: rgba(255,255,255,0.9); 
  border: none;
  outline: none;
  border-radius: 3px;

@media only screen and (max-width: 520px){
  .fields-box label {
    width: 100%;

/* Table */
.table-box {
  padding: 10px 5%;
  background: rgba(255,255,255,0.1);

table, tr, td {
  border: none;
  border-collapse: collapse;

.table-box table, 
.table-box table tr {
  width: 100%;
  max-width: 100%;
  padding: 12px;

.table-box table tr {
  border-bottom: 1px solid rgba(255,255,255,0.1);

.table-box table tr:last-child {
  border: none;

.table-box table tr td {
  padding: 10px;
  text-align: left;
  outline: none;

/* Buttons */
.buttons-box {
  position: fixed;
  width: 54px;
  right: 14px;
  bottom: 18px;
  z-index: 1;

.buttons-box button {
  display: inline-block;
  width: 54px;
  height: 54px;
  margin-top: 14px;
  font-size: .8em;
  font-weight: 700;
  color: #2196F3;
  background: #FFFFFF;
  border: none;
  outline: none;
  border-radius: 100%;
  text-align: center;
    0 5px 10px rgba(0,0,0,0.25), 
    0 4px 8px rgba(0,0,0,0.25);
  cursor: pointer;
  transition: ease .2s;

.buttons-box button:hover {
  background: #EDE7F6;
    0 10px 20px rgba(0,0,0,0.1), 
    0 8px 16px rgba(0,0,0,0.1);

/* Print version */
@media print {
  @page {
    margin: .5cm;

  body {
    border: 6px solid #DDDDDD;

  tr {
    border-bottom: 1px solid #DDDDDD;
  .buttons-box {
    display: none;

Hi! Welcome to my little playground!

My name is Tobias Bogliolo. 'Open source' by default and always 'responsive',
I'm a publicist, visual designer and frontend developer based in Barcelona. 

Here you will find some of my personal experiments. Sometimes usefull,
sometimes simply for fun. You are free to use them for whatever you want 
but I would appreciate an attribution from my work. I hope you enjoy it.


//Default values:
var setChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; //Posible chars.
var setLenght = 12; //Output length.
var setNum = 5; //Items length.

var pass = ""; //Password string.
var plainText = ""; //Plain text version.
var textTitle = ""; //Plain text intro.
var fileName = "pass.txt"; //Plain text filename.

//Random password function:
function randString() {
  //Get user values:
  var newChars = $("#new-chars").val();
  var newLenght = $("#new-length").val();
  var newNum = $("#new-num").val();
  //Check valid values:
  if (newChars) {
    setChars = newChars;
  if (newLenght) {
    setLenght = newLenght;
  if (newNum) {
    setNum = newNum;
  //Reset table:
  //Passwords gen:
  for (i=0; i<setNum; i++) {
    //Shuffle chars:
    for(var j = 0; j < setLenght; j++) {
      pass += setChars.charAt(Math.floor(Math.random() * setChars.length));
    //Append items:
    $("table").append("<tr><td>" + parseInt(i+1) + "</td><td>" + pass + "</td><td contenteditable=''>Edit me!</td></tr>");
    //Reset 'pass' string:
    pass = "";

//Run password generator:

//Password generator triggers:

//Plain text gen:
function toPlain(){
  //Set plain text header:
  textTitle = "\n\n=========================\nRandom password generator\n=========================\n\n"
  //Get raw content:
  tableContent = $("table").html();
  //Remove HTML tags:
  plainText = tableContent.replace(/<tbody>|<\/tbody>|<tr>|<\/td>/g, '').replace(/<\/tr>/g, '\n').replace(/<td>|<td contenteditable="">/g, ' > ');

//Download function:
function download() {
  //Get plain text.
  //Save file:
  var textContent = document.createElement('a');
  textContent.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(textTitle+plainText)); //Set content.
  textContent.setAttribute('download', fileName) //set filename. = 'none'

//Print function:
function printTable(){

//Buttons display:
}, 5000);