Last Update: Jul 11, 2021

Let's learn together. Live shows every week. Check out my channel!

I’m introducing a text / code generation tool that you will fall in love with. If you’re a developer or someone who works with text or tabulated data you need this tool.

It’s called Nimble Text and it’s awesome. Here’s how the developer of Nimble Text describes it:

You can be more awesome at your job by keeping this tool always within reach.

NimbleText is a text manipulation and code generation tool available online or as a free download. It magnifies your ability to perform incredible feats of text and data wrangling.

So it’s a bold claim to say this will make you better at your job. Sounds crazy right?

I have been using this for years (since 2011-2012) and I can tell it’s certainly made me more effective.

Download it and follow along.

How Nimble Text Works

Nimble Text

If you look at the screen that comes up when you first run it, you can get a really good idea of how it works.

You paste in some data, usually in columns and rows (Comma, tab separated, etc.) You put in your pattern ($0, $1, etc represents the columns) For each row of data it will substitute the values and display the results.

in the sample above, you can see rows of data that appear to be last name, first name, company name.

So let’s look at the top row. In our substitution pattern we’re creating an email and it shows $1 (2nd column, starts at 0) which we know is a first name. Then we have a period, and then $0 which we know is the last name, then @ $2 .com which we assume will make

One of the coolest parts of this is that the pattern doesn’t need to be line by line and you don’t need to be a Regex expert to do this.

Here’s another example of how you can quickly add quotes around CSV values. This is using data from Mockaroo.

So we take this CSV file and dump it in the input:

Nimble Text

Then we use this simple pattern, which puts quotes around all the values:

Nimble Text

We press generate, and get this:

Nimble Text

It’s that easy! But this is isn’t really impressive, because you probably aren’t doing a ton of CSV format conversions on a daily basis. But there’s a lot of potential here.

How I Use This as a Developer

So there are tons of things you can do with this that are explained on their website. You can do cool things like remove leading trailing and leading spaces or convert spaces to tabs. I love using things like converting to Camel Case and I’ve done weird stuff with Base64 encoding.

I won’t repeat what’s already been written there. I’ll tell you how I’ve been using it all these years.

Let’s take our sample data set:

Nimble Text

And we’ll see what we can do with it.

Create JSON

Let’s say I want to make JSON out of this. I would put in a pattern like this:

  "id": $0,
  "first_name": "$1",
  "last_name": "$2",
  "email": "$3",
  "gender": "$4",
  "ip_address": "$5"

Nimbletext then prints this out:

Nimble Text

and it will repeat for every row of data. Very cool, and easy.

Make some objects

So as a C# Developer sometimes I’d generate fake data and then use it for Unit testing. With our sample data, I would create a class like this:

public class Person
    public string Name { get; set; }
    public string FirstName { get; set; }
    public string LastName { get; set; }
    public string Email { get; set; }
    public string Gender { get; set; }
    public string IPAddress { get; set; }

Then, let’s say I want to create a collection of these objects. I then enter a pattern like this into Nimble Text:

new Person { Id = $0, FirstName = "$1", LastName = "$2", Email = "$3", Gender = "$4", IPAddress = "$5" },

Then, I click “calculate” and get this:

Nimble Text

Which generates a nice set of mocked objects for testing:

List<Person> people = new List<Person>
    new Person { Id = 1, FirstName = "Derick", LastName = "Giorgietto", Email = "", Gender = "Male", IPAddress = "" },
    new Person { Id = 2, FirstName = "Jorey", LastName = "Bertomieu", Email = "", Gender = "Female", IPAddress = "" },
    new Person { Id = 3, FirstName = "Jordana", LastName = "Ofield", Email = "", Gender = "Female", IPAddress = "" },
    new Person { Id = 4, FirstName = "Zelda", LastName = "Pett", Email = "", Gender = "Female", IPAddress = "" },
    new Person { Id = 5, FirstName = "Malia", LastName = "McCuffie", Email = "", Gender = "Female", IPAddress = "" },
    new Person { Id = 6, FirstName = "Juliet", LastName = "Sivior", Email = "", Gender = "Female", IPAddress = "" },
    new Person { Id = 7, FirstName = "Trista", LastName = "Filde", Email = "", Gender = "Female", IPAddress = "" },
    new Person { Id = 8, FirstName = "Bartlet", LastName = "Pankhurst.", Email = "", Gender = "Male", IPAddress = "" },
    new Person { Id = 9, FirstName = "Giorgi", LastName = "Verbeke", Email = "", Gender = "Male", IPAddress = "" },
    new Person { Id = 10, FirstName = "Issy", LastName = "Ramplee", Email = "", Gender = "Female", IPAddress = "" }

I have done this countless times over the years. Once you get it into your regular workflow, mocking up data takes seconds.

SQL Statements

You can even make SQL statements like this:


$ONCEINSERT INTO Person (id, first_name, last_name, email, gender, ip_address) VALUES
$EACH($0, "$1", "$2", "$3", "$4", "$5"),

The $ONCE variable prints the first statement, then $EACH loops through after that. So you get this in return:

INSERT INTO Person (id, first_name, last_name, email, gender, ip_address) VALUES
(1, "Derick", "Giorgietto", "", "Male", ""),
(2, "Jorey", "Bertomieu", "", "Female", ""),
(3, "Jordana", "Ofield", "", "Female", ""),
(4, "Zelda", "Pett", "", "Female", ""),
(5, "Malia", "McCuffie", "", "Female", ""),
(6, "Juliet", "Sivior", "", "Female", ""),
(7, "Trista", "Filde", "", "Female", ""),
(8, "Bartlet", "Pankhurst.", "", "Male", ""),
(9, "Giorgi", "Verbeke", "", "Male", ""),
(10, "Issy", "Ramplee", "", "Female", "")

Easy as pie! Anything you can do with JavaScript you can do with Nimble Text.

HTML Tables

So this is odd but something I’ve had to do in the past, and Nimble Text works great for it. Here’s how you create an HTML table for our sample data:

$ONCE    <tr><th>ID</th><th>First Name</th><th>Last Name</th><th>Email</th><th>Gender</th><th>IP Address</th></tr>
$EACH    <tr><td>$0</td><td>$1</td><td>$2</td><td>$3</td><td>$4</td><td>$5</td></tr>

Click generate and there it is:

Nimble Text

A usable HTML table!!


This tool will help you become a better, more effective developer. You can use it for all kinds of code generation. I’ve done some crazy things with the Keywords and Functions in this program. You can write code to generate code.

I’ve seen the most benefit with time savings. Things like mocking data or processing CSVs are boring and tedious. When you’re doing boring tedious things you make mistakes. So once you work this tool into your workflow you’ll work faster with fewer mistakes.

Once it becomes a part of your routine you won’t want to work without it.

Download it, try it out, and let me know what you think!

Published: Jan 10, 2020 by Jeremy Morgan. Contact me before republishing this content.