Home > Apps

Can Claude write code? 

Taking a look at the new AI chatbot's coding abilities
Last Updated on July 20, 2023
You can trust PC Guide: Our team of experts use a combination of independent consumer research, in-depth testing where appropriate - which will be flagged as such, and market analysis when recommending products, software and services. Find out how we test here.

Curious as to whether Claude can write code? You’re not alone. Claude is an AI assistant created by Anthropic to have natural conversations through language models and Constitutional AI. Among the several interesting things that Claude can do is writing computer code. However, its coding capability is limited at present.

The latest upgrade, Claude 2, on the other hand, has advanced computer coding and arithmetic capabilities compared to previous models. Like several other leading chatbots, such as OpenAI’s ChatGPT and Inflection AI, Claude 2 can debug, write, and explain code in various programming languages. In the Codex HumanEval Python coding test, Claude 2 scored 71.2%. This goes to show how effective it is when it comes to writing computer codes.

Essential AI Tools

Editor’s pick
Only $0.00019 per word!

Content Guardian – AI Content Checker – One-click, Eight Checks

8 Market leading AI Content Checkers in ONE click. The only 8-in-1 AI content detector platform in the world. We integrate with leading AI content detectors to give unparalleled confidence that your content appear to be written by a human.
EXCLUSIVE DEAL 10,000 free bonus credits

Jasper AI

On-brand AI content wherever you create. 100,000+ customers creating real content with Jasper. One AI tool, all the best models.


10x Your Content Output With AI. Key features – No duplicate content, full control, in built AI content checker. Free trial available.


Experience the full power of an AI content generator that delivers premium results in seconds. 8 million users enjoy writing blogs 10x faster, effortlessly creating higher converting social media posts or writing more engaging emails. Sign up for a free trial.


Create SEO-optimized and plagiarism-free content for your blogs, ads, emails, and website 10X faster. Start for free. No credit card required.

Can Claude write code? In short, yes

Claude AI is a new model which has been used previously by DuckDuckGo’s DuckAssist and Quora’s Poe to help users with various queries. It is now available to the public via API or on it’s public-facing beta website, claude.ai, to those in the US or UK. Claude 2 is the more advanced larger model promising detailed longer responses, but there’s also Claude Instant, which is better for for snappy responses and basic Q&A queries.

Anthropic’s new AI platform does have the ability to write code. You can do this by using prompts, inputting requests into the large language model (LLM). Make sure to be exact and include the coding language, action to be taken, and then instruct the AI chatbot to ‘execute’ the task. It can answer questions about coding too. However, as it is in its earlier stages, the coding ability is somewhat limited – although results show it is already competing with ChatGPT.

You’ll need to exchange tokens for this. We’ve got a handy guide to the pricing if you want to check it out.

Aside from Writing Code, What Other Things Can it do?

Claude can do a bunch of other things besides writing computer code. Much of these features echo GPT-4. They tend to take place in the style of natural conversation. Claude avoids harmful outputs such as hate speech through the creators training of it upon principles like the UN’s Universal Declaration of Human Rights. This distinguishes from competitors like Google Bard. 

Generating Creative Content

Claude can generate original blog article. All you have to do is enter the topic and length, and Claude will write a unique article for you. Claude can also generate other types of original text content, such as poems, stories, song lyrics, and more. It does all these in just a few seconds, depending on the number of words requested.

Answering Broad Queries

Claude’s abilities go far beyond coding. With its vast knowledge base, Claude can answer general questions on many subjects, including science, history, geography, music, movies, and more. You just need to type the question in the text field, and Claude will provide an answer to the question. It provides useful information based on the question entered. 

Summarize Long Text

Another thing Claude can do is text summarization. You just need to enter the text document and ask Claude to summarize it for you. The text will be summarized instantly, with all the main points captured.


Claude supports multiple languages. As a result, it can translate text fluently between languages like English, French, Spanish, German, Arabic, Chinese, Russian, and more.

Can Claude write code? Final Thoughts

Claude is a versatile AI assistant that can be used for several tasks. Aside from writing code, it can also generate content, answer questions, summarize text, translate text from one language to another, and more.

As a tech and AI writer for PC Guide, Gloria is interested in what new technology means for the future of consumer electronics and digital and broadcast journalism.