<p>The results are specific to the website and the order in which the addresses were input.</p>

<p>This can be easily determined by experiment. I took a random address from BE and it gave me <a href="http://btc.to/2z7" rel="nofollow">http://btc.to/2z7</a>. I took another address and it gave me <a href="http://btc.to/2z8" rel="nofollow">http://btc.to/2z8</a>.</p>

<p>So clearly, it stores all given addresses in a database, and the URL is the address ID encoded in base 36 (experiment also shows that it's case insensitive).</p>

<p>Also, it only accepts valid Bitcoin addresses.</p>

<p>More generally, it's impossible for any algorithm to take an arbitrary long, high-entropy string and give a short string which can be uniquely mapped back to the input.</p>

CC BY-SA 3.0
2012-01-12T17:10:05.657Z
As for the last part, you can still create an algorithm that shortens some of those high-entropy strings, especially if you have some additional information about them (like FirstBits did).
ThePiachu
CC BY-SA 3.0
2012-01-12T17:23:57.473Z
Firstbits makes use of the fact that the address already appears in the block chain, which means that it is not high-entropy (or that it is not arbitrary, depending on how you look at it).
Meni Rosenfeld
CC BY-SA 3.0
2012-01-12T17:01:22.830Z
2012-01-13T08:25:42.523Z
2012-01-13T08:25:42.523Z
Meni Rosenfeld
<p>How does the btc.to address shortening algorithm work? Is is a deterministic algorithm, that is, it can be reproduced on other websites with the same results, or are the results specific to the website and the order in which the addresses were inputted?</p>

CC BY-SA 3.0
2012-01-12T11:30:40.713Z
this might actually be more appropriate on StackOverflow, as it isn't actually a bitcoin specific piece (cf twitter's t.co, and stackexchange's own shortened URL's)
Rory Alsop
CC BY-SA 3.0
2012-01-12T11:54:53.010Z
@RoryAlsop: I'd say it's pretty Bitcoin specific since it is a way to shorten _Bitcoin_ addresses, not a general service for web addresses or so. Do you agree?
D.H.
CC BY-SA 3.0
2012-01-12T12:00:26.073Z
@RoryAlsop I believe this question is on-topic, as it deals with a website specific to Bitcoins. Whether their algorithm relies on Bitcoin-related data or not is (at least to me), unknown, thus only by answering this question we can know if any further topics related to btc.co would be on, or off topic.
ThePiachu
CC BY-SA 3.0
2012-01-12T12:22:48.277Z
that makes sense - I was thinking it was the more general case.
Rory Alsop
<address><websites><address-format>
What is the btc.to address shortening algorithm?
ThePiachu
# What is the btc.to address shortening algorithm?

(Asked by: username_0 on 2012-01-12)

How does the btc.to address shortening algorithm work? Is is a deterministic algorithm, that is, it can be reproduced on other websites with the same results, or are the results specific to the website and the order in which the addresses were inputted?

**Tags:** address, websites, address-format

> **Comments:**
> **username_1**: this might actually be more appropriate on StackOverflow, as it isn't actually a bitcoin specific piece (cf twitter's t.co, and stackexchange's own shortened URL's)  
> **username_2**: @username_1: I'd say it's pretty Bitcoin specific since it is a way to shorten _Bitcoin_ addresses, not a general service for web addresses or so. Do you agree?  
> **username_0**: @username_1 I believe this question is on-topic, as it deals with a website specific to Bitcoins. Whether their algorithm relies on Bitcoin-related data or not is (at least to me), unknown, thus only by answering this question we can know if any further topics related to btc.co would be on, or off topic.  
> **username_1**: that makes sense - I was thinking it was the more general case.  

---

## 1 answers

### Answer by username_3 on 2012-01-12. Score: 3 | Accepted answer

The results are specific to the website and the order in which the addresses were input.

This can be easily determined by experiment. I took a random address from BE and it gave me <http://btc.to/2z7>. I took another address and it gave me <http://btc.to/2z8>.

So clearly, it stores all given addresses in a database, and the URL is the address ID encoded in base 36 (experiment also shows that it's case insensitive).

Also, it only accepts valid Bitcoin addresses.

More generally, it's impossible for any algorithm to take an arbitrary long, high-entropy string and give a short string which can be uniquely mapped back to the input.

> **Comments:**
> **username_0**: As for the last part, you can still create an algorithm that shortens some of those high-entropy strings, especially if you have some additional information about them (like FirstBits did).  
> **username_3**: Firstbits makes use of the fact that the address already appears in the block chain, which means that it is not high-entropy (or that it is not arbitrary, depending on how you look at it).  

---

