The company said it uploaded the code in two repositories on code-sharing platform Github. They include the source code for many parts of Twitter, including the recommendations algorithm which controls the tweets that users see on their timeline.
The repositories do not include the code that powers Twitter's ad recommendations, it said.
The move comes at the behest of its billionaire owner Elon Musk, who earlier hinted at the code reveal and said code transparency would lead to higher trust among users and rapid improvements to the product.