Zero Width Shortener (ZWS)
Shorten URLs with invisible spaces.
Try it out online: zws.im (or with our CLI).
You could also host your own private instance and use any characters you'd like (a-z, emoji, etc).
Contributors
Code Contributors
ZWS is maintained by Jonah Snider but contributions to the codebase are more than welcome!
Special thanks to Jaex for integrating ZWS into ShareX.
Financial Contributors
Help support this project as a financial contributor.
Individuals
Organizations
Support this project with your organization. Your logo will show up here with a link to your website.
Status page
A status page for the official zws.im instance of ZWS is available at status.zws.im.
Self-hosting
Heroku
Running an instance of ZWS on Heroku is the easiest way to self-host.
You can also stay totally within the free limits of both the web process and the Heroku Postgres database.
Note that the Hobby Dev (free) plan of Heroku Postgres has a row limit of 10,000, which might not be enough for your use case.
Consider using the API key feature of ZWS to restrict access to your instance.
DigitalOcean
We provide a template app specification YAML file to allow users to launch an instance on the DigitalOcean App Platform.
Docker Compose
- Clone the repository
- Copy
db.example.envtodb.envand fill in the values - Copy
example.envto.envand update theDATABASE_URLenvironment variable to match the values indb.env - Remember to change the hostname of the database container to
db- trying to uselocalhostwill not work - Run
docker-compose up -d(this will automatically apply database migrations)
Database migrations
Database migrations are automatically applied on Heroku and Docker Compose. You can easily run database migrations manually through Docker Compose by running the following command:
docker-compose up migrationMake sure the DATABASE_URL environment variable in .env is accurate.
Heroku Postgres
If you are hosting your instance on Heroku, migrations are automatically applied. If you need to manually apply migrations or are only using Heroku for your database you'll need the credentials for your database:
- Get the Heroku Postgres connection URI from
- the web interface (select your datastore, "Settings", "Database Credentials", "URI")
- the Heroku CLI
- Create a
.envfile and enter in the connection URI
Example:
DATABASE_URL=postgresql://johndoe:randompassword@localhost:5432/mydb?schema=publicAfterward you can run the migration commands shown above.
Badges
ZWS instances expose a few routes that implement the Shields endpoint schema:
| Image | Route | Description | Example |
|---|---|---|---|
/stats/shields/urls |
Number of shortened URLs | https://img.shields.io/endpoint?url=https://api.zws.im/stats/shields/urls |
|
/stats/shields/visits |
Number of visited URLs | https://img.shields.io/endpoint?url=https://api.zws.im/stats/shields/visits |
|
/stats/shields/version |
ZWS version | https://img.shields.io/endpoint?url=https://api.zws.im/stats/shields/version |