X (formerly Twitter) automatically shortens URLs posted on X, so you don't need to use third-party link shorteners like Bitly unless you're looking for precise data about the shortened URL.
How to shorten a URL
X limits tweets to under 280 characters. In the past, users relied on link-shortening websites to shorten URLs before posting to X (formerly Twitter). These tools ensured that URLs didn’t take up much space in a tweet. X soon introduced its own link shortener—t.co—to minimize the number of characters.
When you paste a URL into the tweet field in X, the t.co service shortens it to 23 characters, regardless of the length of the original URL. Even if the URL is shorter than 23 characters, it still counts as 23 characters. You cannot opt out of the t.co link shortening service, because X uses it to collect information about how many times a link is clicked. X also protects users with its t.co service by checking converted links against a list of potentially dangerous websites. If a site appears on the list, users will see a warning before they can proceed.
Bitly and a few other URL shortening websites differ from other link shortening websites in that they offer analytics on the shortened links. For example, when using the Bitly website, you enter a URL and click the Shorten button to receive a shortened link that is shorter than 23 characters. You can use that link on X, but the t.co service will still count it as 23 characters.